Did you implement this with the Fixed Stack, Upgradable Stack, or External Memory model? AFaIK the main risk with any of these is uploading an otherwise valid object file which doesn't execute properly and/or provides no way to exit back to the bootloader.
I'm using Upgradable Stack.
This is my issue and I solved it following the instructions
But you need to do it with a Customer Component to avoid PSoC to use the default Generated Code
To do it use this link