How can a foundation be built on a lie, this has nothing to do with homosexuality, if he is gay so what. The problem stems from the girl doesn't know, I don't know where it is written you can do anand karaj based on a lie. This guy went in front of Guru Granth Sahib ji and lied.
Dig out the relevant information please as I haven't read about them being punished as obviously Guru Pita ji was in war footing at the time, it sounds out of character because he didn't punish sikhs in dehli for denying their faith but expected them to take up a second commitment i.e. Second chance.