Philosphers have been puzzling over the 'Brain in a Vat' problem for several decades. The 'problem' comes down to arguments over whether it's possible (or not) to philosphically 'prove' that one (i.e. the observer) is not simply an isolated brain that is, in effect, imagining the entire world around it.
There have been many treatises written about the problem. Some insisting that one could, theoretically, be able to work out if one was simply a brain in a vat - and others which maintain the opposite.
Here are some example papers :
● Do You Know That You Are Not a Brain in a Vat? Logos & Episteme, Volume 5, Issue 2, 2014, Pages 161-181
● How Both You and the Brain in a Vat Can Know Whether or Not You Are Envatted Aristotelian Society Supplementary, Volume 92, Issue 1, 2018, Pages 151–181
● How I Know I’m Not a Brain in a Vat Royal Institute of Philosophy Supplements, Volume 64
● Serious theories and skeptical theories: Why you are probably not a brain in a vat Philosophical Studies, volume 173, pages1031–1052(2016)