I don't think the hatch act is supposed to prevent the use of the White House account for political purposes. It seems like basically every administration with an X account has done this, e.g.: https://x.com/WhiteHouse46/status/1662171756830892032 .
Although there are probably more contentious case with other government agencies.