<!-- Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest version of the relevant Lexical packages to make sure your issue has not already been fixed. --> Lexical version: v0.40.0 ## Steps To Reproduce 1. Go to https://playground.lexical.dev/ 2. Click clear and type "https://playground.lexical.dev playground" 3. Move the caret to the middle of the link and hit enter (or shift-enter) see: https://github.com/user-attachments/assets/79c51ca5-4852-4b1b-a7a1-85cf57d3842b <!-- Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than Lexical. Issues without reproduction steps or code examples may be closed as not actionable. --> Link to code example: <!-- Please provide a CodeSandbox (https://codesandbox.io/s/new) or (https://stackblitz.com/github/facebook/lexical/tree/main/examples/react-plain-text?embed=1&file=src%2FApp.tsx&terminalHeight=0&ctl=1&showSidebar=0&devtoolsheight=0&view=preview), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve. --> ## The current behavior The text after the caret moves to a new line, but it doesn't keep the original order. ## The expected behavior The text after the caret moves to a new line, and it keep the original order. ## Impact of fix <!-- - How severe is this bug? How often does it happen? Is it causing an outage somewhere? - Who would benefit from this fix? Any specific users, groups or companies? - If possible include metrics. Approximately how many users would this fix benefit? -->