Dynamic rendering is a solution to this where your website is rendered server-side and served to the bots as static HTML, and remains unchanged to visitors. This allows search engine bots to quickly crawl the website, understand the content and index them properly. Giving them a much stronger SEO position.
You may have already tried using this, it’s a great workaround. Either way, the good news is that Google has now published guidelines on how to do this effectively, you can see these here.