US President Donald Trump has been sharply critical of federal workers, especially those who want to keep working remotely.