The difference is that Trump (and Biden/Harris) were invited to be there by Gold Star families to honor their dead. McCain went there uninvited to film a television commercial. If Obama was in invited and attended the ceremony this wouldn’t have been an issue.