Ah I see. That is a difficult one and it described by the authors of CKEditor5 here: https://ckeditor.com/docs/ckeditor5/latest/builds/guides/migration/migration-from-ckeditor-4.html
It includes a lot of custom work that since there is no simple upgrade path from CKEditor4 to CKEditor5 as stated in the "Existing data" chapter.

Perhaps the last line of this chapter is the quickest solution for you. Add a boolean to your database entity to indicate that it's CKEditor5 content. If not, use the CKEditor4 method to display data.
If you need any further help with this please contact the original authors. I'm not able to assist you further with this issue.
Greetings,
Vincent