I am 1.7 m tall and bought a MTB with a frame that is 3-5 cm too big
A bike with too much 'reach' i.e., the bars are to far forward and low would only affect seat comfort if you are not able to band your spine enough and are having to rotate your pelvis forward as well.

I'd check your seat height, fore-aft position and tilt for proper adjustment first. There are many guides for seat height and fore-aft position available online. For for-aft position look up the 'knee over pedal spindle' (KOPS) method which will give you a good approximate seat position.

Note that moving the seat forward to be more upright in your upper body also moves your feet relatively further back which can rotate your pelvis forward and exacerbate the discomfort you are experiencing.