Ok, so I use Gboard and it doesn't seem to do that for me, it leaves existing spaces alone. Here are my settings:
Under Text Correction I have enabled:
Show suggestion strip
Auto correction
Auto capitalization
Double space period
Proofread
Everything else is disabled, so maybe try toggling things off and on and seeing whether the behavior changes?
I also have two keyboards I switch between: English (US) and हिन्दी . I'm unsure whether having multiple language keyboards changes how the base functionality works.