Senator McCaskill has introduced a bill which would prevent members of Congress from receiving their pay during a government shutdown. If it passes and is somehow found to be constitutional (it likely isn't), I don't think it would do much to prevent government shutdowns or make the current #ShitholeShutdown any shorter.
When shutdowns resolve, the Federal government pays backpay to federal workers, so ultimately they don't lose any pay. That is not to say that the shutdown does not cause serious hardship for federal employees. The paychecks do stop during a shutdown and while eventually they will get paid back, the mortgage and other bills don't stop. Most Congress-critters are multi-millionaires. They are not like other federal workers who are going to suffer because they miss a paycheck. I don't think most of them would even notice if a direct deposit or two doesn't come through in time. They are not living from paycheck to paycheck.