Apple built some models with upgraded video options at the time of purchase, the video was never intended to be upgraded by a third-party.
However, based on disassembly photos and a variety of teardowns, it appears that some models had the video mounted on its own card and it is theoretically upgradable. Be that as it may, for firmware update & driver compatibility, you'd need to stay with an "OEM upgrade" (AFAIK there isn't one - you already have the "upgraded VGU) so I would advise against changing the VGU. because, after all the expense and labor you could have driver/firmware problems.
IMnsHO if you want a gaming machine sell this iMac and buy one. DIY isn't the answer to every question.
If this Answer is helpful please remember to return and mark it Accepted.