Drake Maye threw two touchdown passes and ran for another as the New England Patriots erased a 13-3 halftime deficit to beat the Miami Dolphins 24-19.