Annoying "Unable to connect to Home Assistant." issue after logging in

This has started in the past week. I am not sure what caused it, as I did not update HA before the issue started.
The web interface becomes unresponsive, so I go to the log in screen, it seems to accept my credentials but then says

"Unable to connect to Home Assistant.

Retrying in … seconds"

If I check the Web Developer tools, I can see that it’s a POST to /auth/token that results in 400 Bad Request:

This is logged at the same time

2024-05-06 22:04:21.023 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from localhost (127.0.0.1). Requested URL: '/auth/token'. (Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0)

I assume this is the cause of the issue.

I had this problem a few days ago and restarting the HA container didn’t fix it and it was about time for an update, so I just updated to the current version [whatever was current on 2023/05/03]. The issue seemed to go away, but now it is back again!

It looks like it’s this:

banning 127.0.0.1 due to some perceived infraction [I say “perceived” because I *know* I didn’t put the credentials in wrong, they’re saved in the password manager, so they’re never entered manually].

In the documentation it says “ip_ban_enabled boolean (Optional, default: false)”, so it’s off by default. I have no http: entry in my configuration.yaml, so why is it banning me?