I’m not sure why are you not able to log in to the created accounts, but did you consider creating the administrator account in an After Startup microflow (instead of having to deploy multiple times to get it ready)?
Go to Project ‘ProjectName’ > Settings > Runtime (tab) > After Startup (Select the microflow).
This microflow will run every time you start your App, and in that microflow, you can check if the administrator account exists (we do that by retrieving the user with name=’MxAdmin’), and you make sure that it is active. If it doesn’t exist, you create it and you set all required attributes and associations in that microflow. You can also reset its password.
You can use the same after startup microflow to initialize other system configurations as well.