Hello,
Welcome to Microsoft Q&A!
This is the expected behavior. It is mentioned in the document here: Prepare to package a desktop application -- 'Your application needs to work while running as the interactive user. Users who install your application may not be system administrators, so requiring your application to run elevated means that it won't run correctly for standard users. If you plan on publishing your app to the Microsoft Store, apps that require elevation for any part of their functionality won't be accepted into the Store.'
So you might need to change the functions that require administrator privileges.
Thank you.