Autocomplete puts the text at the start of the next line rather than at the cursor

Problem description:
Autocomplete puts the text at the start of the next line rather than at the cursor when I press enter to select an option.

Expected behavior:
Autocomplete puts the text at the cursor when I press enter to select an option.

Actual behavior:
Autocomplete puts the text at the start of the next line rather than at the cursor when I press enter to select an option.

Steps to reproduce:
Not sure. It works sometimes, and other times it does not. It goes back and forth throughout a session.

Bug appears at this link:
https://replit.com/@CS-262/Project-2-CS-262#artist/Rectangle.java

Browser/OS/Device:
Firefox 110.0 (64-bit)/Windows 10 Home Version 22H2 19045.2604 Windows Feature Experience Pack 120.2212.4190.0/H570 motherboard

Could you share a screenshot?

Weird. I have both behaviours.
I am more annoyed if how random it it. Sometimes great sometimes pretty bad. I hope one day it gets on levels with tabnine

Please also specify what language you are using,