We used nested classes in LWC controller to have a single class with all the AuraEnabled parameters. That works in a no-namespace environment but stops working when we either package that or deploy to a scratch org with a namespace.
It throws the following internal error:
An internal server error has occurred↵Error ID: 1249622784-2726276 (1294986922)
I created a repo with the code sample to illustrate the issue on Github