For higher frequencies you use different core materials and the inductance of the windings is less.
For these and other reasons, they can be made smaller for increasing frequency.
I guess the major consideration is how much higher frequency? Operating a 50Hz transformer at 60Hz is less of an issue than running a 50Hz transformer at 400Hz
By frequency range transformers are classified as power-, audio-, or radio frequency transformers , so the transformer designed for one frequency cannot be use for another.
Transformers designed at a particular frequency when operated at LOWER frequency the core will saturate meaning the magnetic circuit linking the primary and secondary circuit will break.
As the frequency goes up the flux density in the core will drop offsetting to some degree in increase in core loss due to eddy currents in the core at the higher frequency . However the series impedance due to the leakage reactance ( the imperfect coupling between primary and secondary) will rise and the transformer may have poor regulation----its internal volts drop may be much higher. 60Hz transformer at 400Hz may just be on depending upon its loading but would need checking for temperature rise and regulation