I am also trying to find the same feelings while working, but getting the same rewards takes a lot more time than while gaming. Also, it's a lot easier to feel that you are bad at it or that you are not learning as much, or that maybe you are working on the wrong thing when programming than when gaming.
Also, I am really missing a real-life leaderboard. I am pretty competitive and seeing others that are way better than me motivates myself to work hard in order to get to their level. I am always looking for success stories and seeing actual numbers from great projects. I found that IndieHackers is a good place to find motivation from others' work.
What if you'd create like a software "game". Aka, a data structure and algorithm Hacker Rank thingy and then pair up with one other person over voice chat to solve the problem.
I like how you're gamifying coding by putting it in the context of what motivates you about games in the first place.
I'll look up some JS communities.
What I found helpful was to dig deeper into why I enjoyed playing the genres of games that I do.
My favourites are MOBA/ARPG/MMORPG and there was quite some overlap in what I was enjoying.
Stuff like:
Now I'm trying to organise my programming activities to give me the same sort of satisfaction: It's been working well for me.