Why not just work as a regular programmer regardless of what i work on is FOSS instead and keep my own projects under my control for myself?
They may get to choose what features they let you work on during your paid hours, but it's still within the subset of features that are desired / allowed by the maintainers.
So, you still have control, you just get to spend more time working on it. If they want to take it in another direction that you don't want then either they can pay someone else to do it _or_ you can choose to fork your own project and have a version with the behaviors they want and maintain the original version with the behaviors you want.
If you've picked a company that's well aligned with the project then them paying you to work on the thing is generally the same as you working on what you want to work on, with maybe some features more highly prioritized that would otherwise be.
if the project is under a Free Software license, who cares who actually owns the copyright? you can still use the code. sure, ownership does make some difference, but that's a tradeoff i am willing to make.
also, if you start the project on your own and get hired by a company later, they will only own the portion of the code that you wrote after you joined them. you still own everything you created before that point, so if they want to do anything with the code that violates the license, they still have to ask your permission, and if you don't agree, you can still jump ship at that point, and you are no worse off than before taking the job.