PC losses connection with AD after imposting pihole dns

No.

It is unclear what host file you are referring to.
On Linux, /etc/hosts holds IP address to name associations - it is not involved in determining which DNS resolver is used.

If you manually configure your PC to use Pi-hole as DNS server, your resolution chain would be:
client :arrow_right: Pi-hole :arrow_right: public DNS resolver

And that would contradict your intention: