I got this error while trying out a new MAUI project. My first deployment (through VS) went ok, and the application was functioning fine.
It's when I uninstalled the app manually from my device, and then tried to redeploy it with VS that I started to get this error.
XA0137: The 'run-as' command failed with 'run-as: couldn't stat /data/user/0/com.companyname.mauiappshell: No such file or directory
The only way that I could bypass this deployment error was to manually rename the ApplicationId from within the MAUI project file.
So, if your application id is like
<ApplicationId>com.companyname.appname</ApplicationId>
rename it to something like
<ApplicationId>com.companyname.1.appname</ApplicationId>
and try to re-deploy the app to your device.
Hope this will help!