OP thinks that the desktop wallet (Bitcoin Core, Electrum or whatever else) is unsafe in case he uses it to sign message and probably lose funds.
A sign message is a kinda of ownership proof but it does not a mandatory requirement to have funds inside that wallet when, after or before, signing that message to prove that one has control on that wallet.
So why not sign a message from
a 'blank' wallet?
Blank ~ zero-fund inside. Consequently, no one can compromise your funds and you still can sign a message, totally safe.
I think one of good solution is using Electrum (for example, I like it because it is light and does not require too much storage on my computer) to create a wallet, then use it to sign a message. Then, backup that wallet's seeds, keep it safe (but backup should be made in dozens, not only one; just in case). After that, reinstall the Electrum wallet from computer. So no one can compromise that wallet from that computer. But the last thing is keeping backups of seeds safely.
With seeds, anyone who get access to seeds can retrieve that wallet.
There is another way to backup wallet, using the backup file of wallet (that has a strong password too). People who have your wallet backup file have to crack wallet's passphrase to control the private key and funds (if there are) inside. Click on File > Save copy > Type a name for your wallet backup file.
I usually backup my wallet in both two ways, just in case some of those backups broken.