We ran into this bug and after figuring out how to reproduce, we tried NC 24.0.4rc1 with the merged fix. Unfortunately it didn't fix the error, we can still reproduce broken events by switching between calenders.
Edit: It seems this only happens if the title of the event in question has some unicode character or emoji. We can 100% reproduce it by using the white heavy check mark (U+2705 | \xE2\x9C\x85 | WHITE HEAVY CHECK MARK)
Originally posted by @kartoffelheinz in nextcloud/server#30120 (comment)