Use this JSON Script to deploy Microsoft Store app (new) via Graph API if you encounter error "The selected app does not have a valid latest package version."
Modify the application's display name and "packageIdentifier": with the desired app and post the query to deploy the app
All is explained in the video here: https://youtu.be/UlQVv9mHa1A