Is it possible to dynamically set request_name_prefix?

I’m working on a web app that lets users create projects, and each project is a dash app behind a different URL that gets proxied by the web app server. Each dash app is reachable at a URL like webapp.com/dash/{projectname} and is not reachable directly.

I have dash itself running in AWS Lambda, behind API Gateway. The requests get proxied correctly, and everything works great until I try to access multiple projects in short succession, which causes lambdas that are still warm and served up a different dash app before to try and serve requests for another dash instance.

I recently figured out this is most likely because it is no longer supported to have multiple dash instances in a single process ([Feature Request] Document maximum 1 Dash instance being supported in a process at a time · Issue #2399 · plotly/dash · GitHub).

The lambdas cache the existing dash app, and only create a new one once they have to serve up a different project (since it needs a different request_name_prefix), and that’s when things break. The apps themselves are the exact same for every project, so I was wondering if it is possible to instead just change the request_name_prefix on an already running app so I can avoid having to create multiple instances. Trying to modify it with app.config.request_name_prefix does not seem to work.

I also tried recreating the Dash object for every request, but that also doesn’t work (same issue as the other approach)

Any ideas or suggestions would be welcome.

Edit: The main issue is that for the second app no _dash-update-component requests on are made on page load so all figures etc. remain empty

For a bit more information: This is very close to what I want to archieve Application Dispatching — Flask Documentation (2.2.x)