A:
You were wrong
in going with your father to perform Funeral Prayer while being Junub (in a state of post-sexual ritual impurity). You should ask Allah to forgive you for what happened.May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.