When cloning webmaps from one portal to another, it is possible to provide a lookup dictionary with {source_item_id : target_item_id} which exchanges the target layers of a cloned target webmap with the corresponding items in target portal mapped by the lookup dictionary. The parameter is called item_mapping.
But basemap layers are not exchanged! Although provided the correct item ids in the lookup dict the basemap layers of the target webmap are not exchanged with the corresponding items in the target portal.
To make your tool more usefull please also provide to change the basemap layers in a webmap so there is no need for another workaround.
Thanks!