This has happened with a lot of TV shows and Toobworld Central has had to accept the possibility that in the future - to paraphrase Any Warhol - everybody in Earth Prime-Time will have a TV show about themselves. (Hence, all the mentions of 'Gilligan's Island', 'The X-Files', 'The Brady Bunch', 'The Twilight Zone', 'Lost', and especially 'Star Trek'.) Any time a show becomes popular, some other show will eventually reference it.
There's no getting around the fact that the Time Lord has had a TV show created about him. To get around this discrepancy (which we call a Zonk), I came up with the concept that the TV show within the TV show of 'Doctor Who' was underwritten and overseen by UNIT as a way to maintain a deniability of the Doctor's existence to the general public. It's similar to claims by the government that visions of UFOs are caused by swamp gas.
Similar TV programs - and movies - were created to obscure the existence of the spy agency U.N.C.L.E. as well as secret agents James Bond, Kelly Robinson and Alexander Scott.
The Fictional 'Doctor Who' in Toobworld began as a couple of theatrical films starring Peter Cushing. (This is how Toobworld has dealt with the existence of those movies in our world.) The facts about the Time Lord have been deliberately altered so that nobody should guess the truth. For instance, Peter Cushing's version of the Doctor is a human, not a Gallifreyan Time Lord. And his name really is "Doctor Who".
Since then, the focus has been on televised representation, with even scenes from the real series showing up in some other programs - like a clip from one of the "Peladon" episodes with Jon Pertwee as the Doctor. Actual mentions of some of the actors who have played the role have been made so we got around that by saying that those actors were cast because they bore such remarkable resemblances to the actual Doctor in his various incarnations.
But they don't all have to be played by the actual actors that play the roles in our world.
For instance, the Tenth Incarnation of the Doctor as seen in a quick cameo on 'Extras' could have been Rob Harker, who finally got his big break! (As seen in an episode of 'People Like Us'.)
And who knows? Maybe the entire run of the Seventh Doctor with his Companion Ace was played as a puppet show.....
(As seen in 'Spitting Image')
Okay, maybe not.
But as was seen in that quick cameo on 'Extras', the show within a show doesn't necessarily follow the same plots as the real show. UNIT would never allow that.
So on the televersion of 'Doctor Who', the Doctor battles a giant slug named Schlongg.
And then in one of the more recent episodes, this happened.....