I have unfortunately not found anything that seems to solve my issue. My Google-fu may be defunct.

I have upgraded a Drupal site from `9.2` to `9.3`. This works as expected with composer (I use `drupal/core-recommended`). But when I proceed to update the database with `drush updb`, it fails with the following error:

```
[previous output excluded for brevity]
>  [notice] Update started: user_post_update_update_roles
>  [error]  Render context is empty, because render() was called outside of a renderRoot() or renderPlain() call. Use renderPlain()/renderRoot() or #lazy_builder/#pre_render instead. 
>  [error]  Update failed: user_post_update_update_roles 
 [error]  Update aborted by: user_post_update_update_roles 
 [error]  Finished performing updates.
```

Using `/update.php` results in this error:
```
user modul
Opdatér update_roles

    Mislykket: LogicException: Render context is empty, because render() was called outside of a renderRoot() or renderPlain() call. Use renderPlain()/renderRoot() or #lazy_builder/#pre_render instead. i Drupal\Core\Render\Renderer->doRender() (linje 245 af .../web/core/lib/Drupal/Core/Render/Renderer.php).
```

I unfortunately haven't been able to find anything that solves the issue, and since I am still fairly new to drupal, I might not know how to google it properly.

It should be noted that there are a bunch of custom modules made by my job, and the highest currently supported version is (unfortunately) 9.3.x, so upgrading to 9.4 as of writing this is a no-no (planning to upgrade the modules, of course).

I have updated the database for every patch release update without failure; this started as soon as I updated to 9.3.0 with the following command:
```bash
composer require drupal/core-recommended:9.3.0 drupal/core-composer-scaffold:9.3.0 drupal/core-project-message:9.3.0 --update-with-all-dependencies
```

I have updated all the patch releases in 9.2 like so:
```bash
composer update drupal/core-recommended:9.2.[insert patch release here]
```

All of them followed by a `drush updb && drush cr`.

Other possibly relevant information:
 - PHP 7.4 CLI (8.0 in Apache)
 - Apache 2.4.54
 - MariaDB 10.6.11
 - Debian 11.5
 - Drush 10.3.6

I thank you in advance. If you need more information, please do say and I will update the question.