Chemistry has come a long way so someone would have to solve 2 things. 1 a compound whose fragments will have very similar (ideally the same) GCMS retention time AND would not show up on an NMR (or, rather, would overlay an identical moiety). Still findable - but ONLY when you know it's in there.
This wouldn't fool any toxicologist or analytical chemist.
Differentiation between two similar compounds with the same retention time and exact same mass is very easy using triple quad gcms/ms using SIM (selective ion monitoring) or MRM (multiple reacrion monitoring) . If the masses are different with the same retention time it's even easier and the whole point of using a MASS spectrometer...to differentiate by mass, not retention time like UV backends.
But for same retention time and same mass...
The two different compounds will fragment differently and even the same fragments if they happen to make them will be produced at different ratios relevative to the unfragmented ion measured first. So you look at these ratios. It might be 90% fragment. Peak area for compounds A and 10% fragments peak area for compound B, relative to the peak area of the non fragmented ionized compound.
You can also find unique fragments produced by one compound that aren't produced by the other and monitor them using SIM. This makes the problem of same retention times and same mass of two different compounds obsolete.
Overlapping retention times are not an issue at all using triple quad MS which is a mmainstsy of any tox lab.
Lool.at SIM or MRM (multiple reaction monitoring) chromatograms common in.any high end drug testing or tox lab. You see multiple overlapping peaks pf decreasing height for a
single compound. These are 1) the unfragmented compound at full mass 2) fragment, 3).other fragments. Then you just look at the area ratios or unique fragments not produced by the other compound of same retention time and its completely distinguishable which compound is which and you can even quantitate the amounts of each RT overlapping compound.using calibration curves and standards. Without chromatography separation.
But if you do want to separate the stationary phase technology is so advanced now that you can separate even epimers.
Then add in pre analysis functionalization like used in analyzing vitamin D isomers of the exact same mass and retention time (PTAD) derivatization and it gets even easier.
Plenty of tools to solve this problem.
And if you're talking someone making two different compounds with identical Hnmr amd Cnmr spectra (which is impossible)....2D nmr techniques like cosy would make quick work of realizing there are different compounds in there.