Joe Biden had a tense exchange with a moderator over his history on LGBTQ issues