I've tested the patch created by @chrisgross in #6 π Formatting lost when attempting to add/edit paragraph within a list item in CKEditor 5 Active and it fixes the issue.
Zooney β changed the visibility of the branch 3381557-formatting-lost-when to active.
I've tested on drupal/core 10.1.6 and this is what happens when embedding drupal-media (using the "Insert Media" button). Note that the list isn't split into two lists. The desired behavior is to have paragraphs embedded into list item elements rather than splitting the list in two (which is how it worked in CKEdtor 4).
Before:
<ul>
<li>
Test1 Test2
</li>
</ul>
After:
<ul>
<li>
<p>
Test1
</p>
<drupal-media data-entity-type="media" data-entity-uuid="9c10382b-8b46-4005-8aa2-9c62e2e58b3a"> </drupal-media>
<p>
Test2
</p>
</li>
</ul>
Zooney β created an issue.