A dolly zoom moves the camera, that’s the entire point of a dolly zoom. The zoom while moving the camera is only there to keep the framing the same, the actual visual change is caused by the movement of the camera, not by the changing of the focal length. You’d get the exact same effect if you used a fixed-focus lens and just cropped the resulting video to keep the framing constant.
You can also just crop the picture instead of getting closer. Especially with modern cameras with a zillion megapixels this is a viable option.