Texturing keep aspect ratio when scaling mesh (cube)

You have this (in How to scale and orient PBR material textures?) to change uvs afterward.