Trump threatened to withhold federal education funding if Maine does not comply with his executive order and bar transgender athletes from competing in girls’ sports.