longstanding issue (sorry!)
This is because the project settings of the program when it runs at startup are those that were active in the IDE at the time when you first set the program to run at boot, so your auto-boot program is probably still running with the old settings.
To fix this:
- make sure you have the correct settings selected in the IDE and the program is running fine when running from IDE
- go to the IDE settings and select "Run project on boot" > "•None•"
- go to the IDE settings and select "Run project on boot" > "YourProjectName"
this way the settings for run at boot will be updated.