Question:

The protecting (writing) angels do they go in the bathroom?

Answer:

Verily the praises are to Allah, and may Allah’s peace and blessings be
upon prophet Muhammed.

All the actions that people do are written in advance in the lauhul mahfoodh,
and the deeds done in the bathroom would not be unaccounted for. In a hadith from
prophet Muhammed, may Allah’s peace and blessings be upon him, he had mentioned that
things that are offensive in odor to humans, like onions, are also offensive to the
angels. Even though they may not be physically present, they are well aware of all
the actions. Allah created this universe without any flaws, and certainly there
would be no mistakes on the record of peoples’ deeds on the day of judgement, though Allah would forgive much.

And Allah knows. Shaikh Sajid