The verse 23 of chapter 2 of Bhagavad Gita says, “Weapons cannot cut the Self, nor can fire burn it. Water cannot wet it, nor can the wind dry it.”
What is this Self? Self is neither the body nor the mind but the knower of the both. It is the pure witness. So whatever that happens doesn’t happen to the Self.
This topic has been already covered by me in many of my previous posts. To get a clear idea, go through the following posts:
Here is an animated video that explains this sloka: