The lawsuit is the latest by federal workers and their labor unions aimed at curbing the quick-moving DOGE efforts to cut the size and spending of the federal government.