Hello @DotNET Fan ,
Welcome to Microsoft Q&A!
According to the document,
Out-of-proc background tasks support multi-instancing. Typically, each new trigger results in a new instance of the background task (although technically speaking multiple background tasks may run in same host process). Nevertheless, a different instance of the background task is created. In-proc background tasks do not support multi-instancing.
In-processs AppService is not supported for multi-instance apps.
It is recommended to use out-of-processs AppService. Disable multi-instance for out-of-proc service. Create a new service for each instance of UWP. Create a static field in the background task class to store the AppService for desktop extension and initialize it when you create AppService from the desktop extension.
Soumya Mahunt shared the solution, you can try it out.
Thank you.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.