Since Drupal Core Release 10.2.0 it is possible to set a block visibility based on status codes.
* Replace the condition in block userlogin
* Write a update hook to reset the block to origin config or just replace the condition
* Do not install the module http_client_error_status by default
Fixed
2.2
Code