There's a way to approach this topic with a bit more nuance:
It's okay to treat your job as a job. Save your passion for your personal interests.
If you're passionate about programming that's awesome, but use it for code you can do yourself. Nobody can cancel your personal project because business priorities change.
It makes it so much easier if you can internalize that your coding at work does not represent your worth as a person. In many cases the coding you do at work is going to be significantly different than the code you do for yourself.