So if I understand correctly, when we upload we should keep the caret in the original location after the upload is complete? I can replicate the issue:
- Click in the middle of the sentence
- Upload a file
- My caret is now at the end of the sentence

In my gif, the caret goes to the end of the sentence as soon as the processing starts. Note that the upload and processing markdown does go in the correct place at least.
With drag + drop the character stays where it is supposed to be, same with pasting, so it seems like clicking the upload button is the only place this is an issue?