That thought experiment assumes the whole world around you is a fabricated illusion. In which case it would be unnecessary for Satan to fake the Sun at that point, especially considering the pastor wasn’t even there. If everything around you is an illusion, there’s no need for 5D subterfuge chess, the devil could just fake whatever.
So no, Descartes doesn’t apply. Unless I were the one being tested (seeing as I’m thinking, and therefore am). In which case that particular lie would be especially hilariously stupid.