I have a MS5837 Bar30, when I run it with your arduino code on both an arduino, and my ported version to an NXP board I get matching but incorrect values outside the tolerance of the sensor. I am using an external board to change tx/rx voltage to 3.3v logic.
I read 905mbar ± 15mbar, and a stable but anywhere between 21.6 and 28.5 °C temp.
The room is 1013 mbar (confirmed by a CTD and another pressure sensor) and 22.9 degrees.
I’ve submerged the Bar30 and get a pressure change corresponding to the depth, as much as my little bucket would allow, and a temp of 22.6 °C in water which two other sensors clock at 19.6 °C.
My question is what are possible fixes to the pressure calibrating of 100 mbar to low. and temperature readings to be too high.