I recently found out about the concept of “scanner personality”, which covers what you mention (I’m also a “sufferer” of it). If I specialise (too much) I feel constrained and dry up creatively as well.
The trick might be to always imagine multiple angles along which you can approach a problem, however specialized the problem might be. That way, you never feel "constrained".