401 Unauthorized error when running app in preview mode

I have had trouble the last few days running apps (Remix template) in preview mode. This is the case when I create new apps also. It sometimes works temporarily but then the issue reoccurs.
I have already tried solutions like syncing the time mentioned in the forum but to no avail.

Any help would be appreciated.