We have noticed that the fix for MSA-23-0020 introduced in Moodle 4.1.5 causes a regression with resetting courses, which also impacts course deletion.
For most of the courses we tried to delete, everything works fine, but for some courses the process dies with a filereferenceproblem error, Debug info: Not an unserializeable value.
In our tests the problem occurs when deleting a course, resetting the course's forums or resetting the course's assignments.
Using an older version of lib/filestorage/file_storage.php before MDL-78647 (function unserialize instead of unserialize_array) works without errors.
Screenshots of the debug info and stack trace attached.