We tried the workaround you suggested and managed to get the language.
Good to know!
One issue we are facing is. When we render the app proxy page response/HTTP response, we set Content-Type to application/liquid. Menu links render without the language URL.
Yep, that’s where this workaround will fail.