IMHO... it is up to the states. If the Sheriff(s) have such an issue then they should resign. The Sheriff is perfectly able to put in an application for employment with a Federal agency.
The sheriffs have a right to sue. Why should they be forced to quit their jobs over bad policy they aren’t responsible for?
Its the same as a county clerk or judge being forced to issue marriage licenses to queers.