It depends on your application but you should be able to pass the data source (full path to raster or raster object) to the GP tool as an alternative to the layer name. More of a workaround than a solution.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.