There's no harm in using the toilet or bathroom during a thunderstorm.
You can also take a shower or bath during a thunderstorm as well as I've done so many times before and never gotten hurt.
Most houses now have plastic plumbing so it should not be a problem at all to take a shower, bath or use the bathroom during a thunderstorm.
If your house gets struck by lightning then there's more a chance that the house will catch on fire due to the lightning than there is that the lightning would go through the water and shock you.
I've always taken showers and use the toilet during thunderstorms for many years and never have gotten shocked.