I switched from PHP8 to PHP7.4 and it worked fine then.
Strangely if logged in as admin it didn’t cause a problem to start with, if logged in as any lower role then this appeared, e.g. shop manager in woocommerce, but after PHP downgrade it’s stopped happening.