Bhagavad Gita 13.33

यथा सर्वगतं सौक्ष्म्यादाकाशं नोपलिप्यते |
सर्वत्रवस्थितो देहे तथात्मा नोपलिप्यते

Translation

Space holds everything within it, but being subtle, does not get contaminated by what it holds. Similarly, though its consciousness pervades the body, the soul is not affected by the attributes of the body.