On macOS Sonoma System Settings, → type "Keyboard layouts". Click on the found entry. In the panel in the middle, you see. Text Input. Click on the Input Sources Button Edit.. There you see the fifth entry, "Add period with double space". Deactivate it and you are done.