You can't do anything to a standard USB storage device that will prevent an OS (of any type) from doing what it wants to it.
Windows doesn't handle multiple partitions on USB devices well and you can leverage it's behavior, though. But you can't prevent someone from formatting it.
The best you can do is a "guard" partition. Do this:
Put the drive in Linux and use cfdisk to create a partition at the beginning of the drive that's 256MB (or even smaller), and a partition for the remainder of the drive.
Take the drive to a Windows system and format the 256MB partition as NTFS.
Take the drive back to your Linux system and encrypt/do whatever to the second partition. Leave the first NTFS partition in place.
Now, if someone puts it in a Windows system, they won't get a prompt for formatting, but simply see a blank small volume. You can put decoy files there or any other files. They won't know there is a second partition unless they go to diskmgmt.msc
.
That would require to install a different software onto the controller chip inside the USB stick. As those chips are usually not open usable and documented I would say this is technically possible but requires skills and knowledge most people don't have. (and of course on Linux side some additional driver/program would be needed to re-enable the usb stick). – Robert – 2019-10-24T17:51:36.363