Passion for the process
You might not always enjoy what you’re working on. Or agree with the decisions.
Sometimes you might have to do some shallow work that, you think, someone else should be doing. Or automated.
There’s no good answer to doing mindless work, other than to develop a love for the process.
You have to love deepening your knowledge of the code. Or experimenting with a new design trend. Or practicing your project management skills.
All without enjoying the outcome of that work. Not everything will be a highlight in your portfolio.