Initial-state quark energy loss from Drell–Yan production in proton-proton and proton-nucleus collisions