The Bynars upgraded the holodeck in 2364 and Moriarty was created in 2365, so that checks out. I mean, sure, at the end of 11001001 they showed that the capability went away, but there’s no particular reason the holodeck couldn’t have been re-upgraded again sometime off-screen later that year.
Besides, given that they went from Riker looking at the holodeck like he’d never seen one before in Encounter at Farpoint (also 2364), to The Doctor being activated in 2371, it was clearly a time of rapid advancement for holodeck technology.
The Bynars upgraded the holodeck in 2364 and Moriarty was created in 2365, so that checks out. I mean, sure, at the end of 11001001 they showed that the capability went away, but there’s no particular reason the holodeck couldn’t have been re-upgraded again sometime off-screen later that year.
Besides, given that they went from Riker looking at the holodeck like he’d never seen one before in Encounter at Farpoint (also 2364), to The Doctor being activated in 2371, it was clearly a time of rapid advancement for holodeck technology.
They de-upgraded it at the end of the episode.