Dozens of Republicans voted with Democrats in favor of overriding two of President Donald Trump’s vetoes during his second term in office.