By replacing the JavaScript with something else or leaving it be and letting it work. They no longer support JavaScript unless it is in a code page. You can explore code pages or service workers for an alternative. Service workers would be the more powerful one that would be able to make some of the same changes as you do now.
For your exact formula here you are just making it reload the page which there is already a replacement for.
https://community.quickbase.com/blogs/evan-martinez1/2021/07/09/alternatives-to-common-javascript-insertion-techni?CommunityKey=d860b0f8-6a48-487b-b346-44c47a19a804&tab=recentcommunityblogsdashboardhttps://community.quickbase.com/blogs/evan-martinez1/2021/07/15/javascript-upcoming-formula-rich-text-field-change?CommunityKey=d860b0f8-6a48-487b-b346-44c47a19a804&tab=recentcommunityblogsdashboard