Hello and welcome.
I haven't used an iPhone XS personally (I am still using an iPhone 6s), so I am not sure how the image stabilization works. I would assume it would work in all functions of the camera.
Because it works in other modes, I doubt there is a hardware issue, as it wouldn't work in any mode.
Maybe try contacting Apple directly? I will look around and see if I can find anything definitive.
C