The Secret Service is a Federal agency, part of the Executive Branch. They will be withdrawn should Trump go into Federal custody. I think Trump knows the necessity of staying out of a Federal prison. He doesn't want Melania to be a widow.
How do you know that?
This is a unique, first-time-ever situation.
I think Trump could take it to the Supreme Court to decide whether or not he is entitled to keep his protection.