Speaking from experience:
Getting a "normal" development job after working in games is perfectly possible and actually quite straightforward.
The challenges involved in developing game software (data structures, algorithms, etc.) are basically the same as for making any software. There is no fundamental difference. If there ever was a perception that developing games was "just toys" or "child's play", it has long gone among all but the most obstinately obtuse hiring managers.
Indeed, many hiring managers will recognise the particular performance demands that are common in game development (if something takes 17ms when you click a button in a normal app, no-one will notice or care; if something takes 17ms in a game, you're not hitting your 60fps frame rate) and there is great demand for former game developers in software industries such as finance (faster => make more money), VR, AR, mobile (good performance => low CPU usage => good battery life), AI, self-driving cars, etc. Even outside those high-performance domains, there's no downside to hiring former game devs for some other role.
Of course, every choice comes with consequences, and your first job will tend to shape your career, whatever you choose it to be. Will your game job make it more difficult for you to get a databases job later? Maybe, maybe not. But if you got a databases job instead, would it make it more difficult for you to get into games, or web, or AI, later? Maybe, maybe not.
My recommendation (for whatever it's worth, based on my own anecdotal experience): start off with the job you think you'll love and adjust course later if you need to. For me that was games, and I loved it. But a decade or so later I realised I could get paid 30%+ more doing something outside of games, even if I didn't love it quite as much. For me those were the right choices at those times in my life. Your choices might be different.
In any case, if you do choose games now, there will still be other doors open to you later.