Hi,
Thanks for posting in Q&A.
Make sure all of the content referenced by the in-place upgrade task sequence is distributed to a content-enabled CMG. (Enable the CMG setting: Allow CMG to function as a cloud distribution point and serve content from Azure storage.) You can also use a cloud distribution point. Otherwise devices can't run the task sequence.
Here is a helpful article for you to refer to:
https://learn.microsoft.com/en-us/mem/configmgr/core/clients/manage/cmg/setup-cloud-management-gateway#settings
Hope this could help you. Thanks for your time.
If the response is helpful, please click "Accept Answer" and upvote it.