After lots of testing and trying to contact whoever built the website I found that it blocked only user-agents which contained this literal string:
X11; Ubuntu; Linux
Only when that string was in there verbatim would it fail all requests with a 403 Forbidden.After I saw the same error with some other websites for businesses in my town I started seeing a pattern. The company that hosts/builds this website apparently copy/pastes their basic server set up, and so every website they host works everywhere, except when using Firefox on Linux. So maybe one in a thousand users gets this.
I posted my search for the cause of this issue on StackOverflow¹, and even got a reply from (presumably) someone who works for the company that hosts these websites, but alas, the websites remain broken to this day. They suspected a hack to prevent some WordPress exploit…
It's frustrating, because a general practitioner's website should not fail like this (it is a point of contact that sits just below emergency services), but the people that work there don't understand the problem, and the company that hosts is can't be arsed to fix the issue.
1: https://stackoverflow.com/questions/66185885/some-websites-r...