This is the best I can do without actual images to review and compare. iPhone 17 Pro models sensor shift OIS supports high resolution 48MP images and 4K/120fps video capture with very smooth and fluid stabilization.
For video, it combines hardware stabilization with software enhancements to compensate for motion, delivering cinematic quality footage even when walking or running.
The phone also features a dedicated Sports mode that applies more aggressive stabilization by cropping into frames to reduce motion blur further, although with some resolution trade-off.
The iPhone 12 models do not have a Sports Mode and that might be the reason for slightly sharper images. Try turning Sports Mode off at night and then compare images.
Overall, the sensor-shift stabilization on the iPhone 17 Pro is an evolution from previous iPhones, optimized for the higher megapixel sensors and Pro Fusion camera technology across all lenses.
In summary, the iPhone 17 Pro uses state of the art second generation sensor shift optical image stabilization technology combined with advanced software algorithms to deliver best in class stabilization for both photos and videos in various conditions, including low light and action scenarios.
This is an advancement over the stabilization in the iPhone 12 Pro, which also used sensor shift OIS but on lower resolution sensors and without some of the newer software improvements and dedicated modes found in the 17 Pro models.