The question would be does it work with PHP7.4? That would indicate an outstanding PHP 8 issue.
I'm not sure what to say... you should be running Moodle with a supported version of PHP. If you're "experimenting" with an unsupported version then this sort of thing is probably to be expected. If it's repeatable and you can show the steps to reproduce it then it's worth making a tracker report and adding to the PHP 8 Epic.
I'm not sure what to say... you should be running Moodle with a supported version of PHP. If you're "experimenting" with an unsupported version then this sort of thing is probably to be expected. If it's repeatable and you can show the steps to reproduce it then it's worth making a tracker report and adding to the PHP 8 Epic.