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.
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.