I don't know if there's a solution..:(
• Discipline is more useful than motivation. Motivation isn't under your control, so it's not worth relying upon. I've found that pushing my body through discomfort via exercise, stillness, etc. can increase discipline over time.
• I view boredom as "giving up". When I'm bored with a challenge, my mind is telling me that I'm not smart/skilled enough to finish. Yeah, sometimes work is not fun. Conquering boredom to deliver value is an underrated skill.
• Being "just-another employee who is going through the same motions" is the point of being an employee. If you want more variety, maybe you need to work with a studio, become a freelancer, or start your own thing.
• Life became much much easier for me after I started taking antidepressants and ADHD meds. You may want to check in with a therapist/psychiatrist to see if you have any troublesome patterns worth looking into.
There are many worthwhile problems in the world that can benefit from building high quality technology solutions.
It's unavoidable that there are going to be times where the day to day is mundane, but at those times it's great to be reminded that you're still working towards solving a problem that you are passionate about.
Can be easier said than done to find work like that, but maybe a different perspective on how you can find that motivation.