Less than a 2 years I'd say, with 2.5 years at the maximum: Win95 GA is August '95 and Quake 2 hit the last nail in the DOS gaming coffin in December '97
It was an absurdingly fast process, in Jan 1996 we got Duke3D, Quake in the summer, and dual boot with DOS was the norm.
In 1997 we got a bunch of Build-engine releases for DOS: Blood and Redneck Rampage in ~May, Shadow Warrior in September; while MDK, GTA, Carmageddon, Dungeon Keeper, Fallout got a mixed Win/DOS release and 3dfx was at it's peak.
Quake 2, Tomb Raider 2, Wing Commander: Prophecy are released for the Christmas sales and are Windows only.
Dual boot is still a thing for some games, but the new games are targeting Windows and DirectX.
Diablo (January), NFS2 (March) and AoE (October) are Windows only.
In 1998 there is no noticeable DOS-only or Win/DOS releases, except some add-ons for the earlier games.
Before mentioned Quake 2, StarCraft (April), Unreal (May), FreeSpace (June), Half-Life (November) are the ones which dictate the OS would be used. Win98 was released in May.
Even Derek Smart stops developing DOS versions of Battlecruiser 3000AD.