In my case the extra spaces issue was observed for Python versions 3.8 and 3.10. It has gone after upgrading to 3.13