So, is the Olympic opening ceremony canon for James Bond, or the Queen, or both? Probably not, due to Churchill. But it probably is for Mr. Bean.
(Sadly, a celebration of British TV was cut due to overruns, so we didn’t get to see what they’d show while playing the Doctor Who theme to four billion mostly confused people.)
When considering a ("proper", not faked) crossover or a “guest appearance” by characters from elsewhere in the game’s setting or another bit of popular culture, you should consider whether it counts as canon for the PCs or not - and indeed for the other side of the crossover. In-universe crossovers are more likely to “stick” but not always - Warren Ellis once killed off a Wildstorm superhero team during an Aliens crossover. And a bigger setting can absorb a smaller one - Sherlock Holmes being real in the Whoniverse transforms the former but is no big deal for the latter.
So then we get multiple continuities and connected-but-not-integrated universes and the way John Munch exists in all timelines, even ones which are explicitly fictional in his prime universe and in one case meeting the real person he was based on.
An adventure which you flag up as “an imaginary story” without adding “aren’t they all?” may or may not appeal to the players - it can be freeing not to worry about ongoing character and setting consequences and do something clearly different, or it may feel like a waste of time playing an adventure that “doesn’t count”. Something to consider and perhaps discuss beforehand.
Of course, the question of canonicity is easily answered if your players do this...