Welcome, and thanks for posting in the Community. I can share some details about posting journal entries in QuickBooks Online (QBO).
I tried replicating this, but the lines with the same GL accounts are not combining into one line in my test account. To isolate this, let's sign in to your QBO using a private browser (incognito). This will help us check if this is a browser-related issue.
Press Ctrl + Shift + N (Google Chrome).
Ctrl + Shift + P (Firefox).
Control + Option + P (Safari).
Once logged in, create a test journal entry again to double-check. If it's successful, return to your default browser and perform a clear cache to refresh the system. However, if the issue persists, try using other supported browsers.