From a pair of lawyers who served in White House Counsel’s Office under Reagan and Bush I:
First and foremost, the Hatch Act explicitly exempts the president and vice president from its strictures President Trump was entirely within his legal rights to give his acceptance speech from the South Lawn of the White House. Any members of the White House staff who may have assisted and supported the president on Thursday night also were in compliance with the Hatch Act.
Although the Hatch Act prohibits a wide swath of federal workers — including many of the individuals who work in the White House — from engaging in political activities while on duty or “in any room or building occupied,” the White House lawn is not such a room or building. Had Congress intended to extend Hatch Act restrictions to entire government installations or compounds, it could and would have said so.