I have the problem of shaitanic waswasas I keep on cleaning bathing doing wudu continuosly. Today when with all courage i was able to finish Ghusl, I accidentally called someone to close the tap which was outside . Talking from bathroom is considered makrooh act . Is my ghusl valid if I was performing fard ghusl
"Talking in the toilet
Answer: In the name of Allah, the most Beneficent, the most Merciful.
It is against adab and respect that one speaks and talks whilst in the toilet. One should refrain from crying and doing these kinds of these things inside the toilet.
Only Allah Knows Best
Mohammed Tosir Miah
Darul Ifta Birmingham" (https://islamqa.org/hanafi/daruliftaa-birmingham/87484)
"Moreover, the majority of scholars say that it is makruh (disliked) to, unnecessarily, speak in the bathroom/toilet." (http://aboutislam.net/counseling/ask-the-scholar/common-mistakes/using-cell-phone-in-bathroom-allowed/)
So from the aforementioned things, it is clear that ** TALKING UNNECESSARILY is makruh.** In your case, talking (whether unnecessary or necessary) won't affect your GHUSL.
Speaking during ghusl is somewhat disliked (makruh tanzihan), but doesn’t affect the validity of the ghusl itself in any ways. (https://islamqa.org/hanafi/qibla-hanafi/43454)
Secondly, you used the term "accidentally", which shows that you talked without intention. Doing something unintentionally won't make you punishable or won't invalid things (e.g. fast, ghusl, wudu).
At the same time, Allaah says that there is no sin on one who is ignorant, forgetful or makes a mistake.
Allaah describes the believers as saying (interpretation of the meaning):
“ ‘Our Lord! Punish us not if we forget or fall into error’”[al-Baqarah 2:286]
According to a report narrated by Muslim from the hadeeth of Abu Hurayrah (125), Allaah said. “Yes”; according to another report from the hadeeth of Ibn ‘Abbaas (126), Allaah said, “I have done that” (i.e., responded to the prayer uttered in this aayah). (https://islamqa.info/en/answers/10686/there-is-no-sin-on-a-person-who-drops-the-mus-haf-unintentionally)