The issue seems to have been resolved by updating to Joomla 5.0.1 and the latest T4 plugin, with one small tweak to the &load() function in t4core/ModuleHelper.php.
The patch suggested in the first message in this thread has adverse side-effects and does not really help, but the following change solved the issue for me with no negative side-effects:
--- administrator/cache/t4core/ModuleHelper.php.orig
+++ administrator/cache/t4core/ModuleHelper.php
@@ -364,6 +364,8 @@
$app = Factory::getApplication();
+ $modules = static::getModuleList();
+
$app->triggerEvent('onPrepareModuleList', [&$modules]);
// If the onPrepareModuleList event returns an array of modules, then ignore the default module list creation
I understand that this might not be the correct solution; most likely the module array should have been initialized in the line below the insertion, but since it fixed my site, finding a better solution was not a priority ...