Page custom code is not loaded on navigation

I have the issue that the page custom code (head and body) isn’t loaded correctly on navigation. Only when refreshing the page it is added to the DOM. Has anybody also experienced this as well?

I have already created a Bug report but maybe one of you guys have a workaround for this as I have a deadline coming up in two days and some main functionalities don’t work because of the issue…

Are you checking in editor or published app? Custom code doesn’t work in the editor