Any way to prevent what?
Of course she is trying to take the cone off; she has no idea why you are making her wear this annoying thing and she certainly doesn't want to do so. You would object too, if someone put one on you with no explanation you could understand.
But it is better for her to be frustrated and a bit uncomfortable for a while than to risk her interfering with treatment.
You can try to distract her from thinking about the cone, but realistically the answer is that since she will only be wearing it for a short time it isn't worth trying too hard. Give her extra cuddles and/or treats, if you want, but she's just going to have to put up with the cone as long as the doctor said she should.