Bhagavad Gita: Chapter 13, Verse 32

अनादित्वान्निर्गुणत्वात्परमात्मायमव्यय: |
शरीरस्थोऽपि कौन्तेय न करोति न लिप्यते || 32||

anāditvān nirguṇatvāt paramātmāyam avyayaḥ
śharīra-stho ’pi kaunteya na karoti na lipyate

anāditvātbeing without beginning; nirguṇatvātbeing devoid of any material qualities; paramathe Supreme; ātmāsoul; ayamthis; avyayaḥimperishable; śharīra-sthaḥdwelling in the body; apialthough; kaunteyaArjun, the the son of Kunti; naneither; karotiacts; nanor; lipyateis tainted

anaditvan nirgunatvat paramatmayam avyayah
sharira-stho ’pi kaunteya na karoti na lipyate

Translation

BG 13.32: The Supreme Soul is imperishable, without beginning, and devoid of any material qualities, O son of Kunti. Although situated within the body, It neither acts, nor is It tainted by material energy.

Commentary

God, situated within the heart of the living being as the Supreme Soul, never identifies with the body, nor is affected by its states of existence.  His presence in the material body does not make Him material in any way, nor is He subject to the law of karma and the cycle of birth and death, though these are experienced by the soul.