This is exactly why I can't work at a job in the industry.
I work on my own code ([1], comments at [2]), and it is exactly why I do this; I wouldn't enjoy it otherwise.
For me, I just decided to forego jobs and work on my code the way I want to until I eventually make a business out of it. Or to keep it as a hobby and do something else as a job. (I have a CDL for this reason.)
I don't know if that will work for you. But something else might.
[1]: https://gavinhoward.com/2023/02/why-i-use-c-when-i-believe-i...