Larger oil-filled transformers are sometimes dehydrated by removing the oil and pulling a vacuum inside the chassis for an extended time. That requires that the chassis must be rated to hold a vacuum. If I read correctly, the dielectric strength of a vacuum is greater than that of the insulating oil. Given that, why not just run such a transformer at a vacuum all the time? Do the thermal benefits of the oil overwhelm the benefits of the insulation being perfectly dry all the time? If so, could you design a transformer that wouldn't have that property? Are there, in fact, transformers designed for vacuum operation?
Large oil-filled transformers use the oil as a thermal transfer medium as well as a dielectric. That's why the cooling fins are on the outside.
If there was a vacuum inside the coils would run very hot and would require massive derating to protect the wire insulation. There would still be heat loss through the wires to the outside world and also by conduction through the mounting means, and by radiation to the housing. Transformer oil is essential to minimizing the size and cost of large transformers. Pure water would be vastly thermally superior to oil, but the slightest ionic contamination would be an issue.
There is no particular trick in making a transformer operate in a vacuum, it just has to be designed so the heat produced can get out of the innards. If it's for space use you may have to specify materials that don't outgas excessively.