Hi Sahana,
If the domain join process fails then Autopilot fails, you can allow the users to reset the process in the ESP configuration profile.
Here's more info regarding troubleshooting
[https://www.anoopcnair.com/windows-autopilot-hybrid-azure-ad-join-trouble/