Armature and stator steel laminations only have a very thin coating of varnish that is not perfect. Therefore, pinholes in the coating would allow moisture to enter and rust, like cancer tends to spread. Many motors are subjected to temperature extremes and hence subjected to condensation.
Clear nail polish is excellent for coating electrical connections to block moisture but not suitable for high temperatures.
It's far better to use electrical varnish on motor internals than acrylics due to temperature ratings. Acrylic would probably be OK for the exterior of a motor housing and you can find that at hardware stores.
Typical small cans of brush-on e-varnish:
https://www.eis-inc.com/catalog/varnish-resins-and-coatings/varnishes/varnish-ph21-synthite-ac-46?option=varnish-dolac46
General listing page: https://www.eis-inc.com/catalog/varnish-resins-and-coatings
or...https://www.alliedelec.com/product/mg-chemicals/4226a-55ml/73641102/
Spray-on e-varnish: https://www.mcmaster.com/7437K21/
E-varnish Properties (from McMaster-Carr):

Now, compare the temperature ratings of this
acrylic product: https://www.mcmaster.com/7850T4/
Properties:
This product might work as well but I don't know the thermal properties:
https://www.lowes.com/pd/Natural-Earth-Paint-Natural-Varnish-4-oz/5005463737
As you can see, the proper product to use can be quite expensive. If you have a local motor shop, they would probably give you a small quantity if you bring a safe container, consider they probably buy it in large drums for their motor dipping tanks.
Hope this helps and it gave me a refresher on a few topics!......
KY