A federal worker’s pay is tied to the availability of funds from Congress, but not all employees are affected equally during a shutdown. The president and members of Congress receive timely paychecks because this is mandated by the U.S. Constitution.
Those whose duties rely on non-congressional funding sources continue to receive pay without interruption. These include military personnel, airport security screeners, and law enforcement officers who perform critical public safety roles.
Social Security, Medicare, and healthcare providers generally keep operations going during a shutdown, allowing continued payments and reimbursements for seeing covered patients. However, non-essential employees face unpaid time off, with work being considered more long-term in nature, such as researchers on future projects or staffers supporting training programs and inspections that aren’t emergency-related.
Source: https://apnews.com/article/trump-federal-shutdown-paid-congress-jeffries-schumer-thune-9ecc7db2e689c45d288268aabf061498