If you ask people what the ideal sitting posture is, most if not all will reflexively offer some variation of 'sit up straight at 90. Or keep your back straight.' but the ideal sitting posture is a variable one or constanly changing one.
Frequent changes in sitting position: leaning the seat back while keeping feet flat on the floor, sitting back and propping your legs up on the desk, or crossing your legs. The real goal then should be to prevent any given structure or tissue from bearing the load of sitting for too long, that can be accomplished by regularly shifting position. If you are sitting so rigidly upright that it's effortful, you will be in an unnatural position that will increase the pressure on back and fatigue your back structures.
Finally, do not forget to take some relief from sitting altogether. Roughly once per hour, it is helpful to stand up, gently stretch your arms towards the ceiling, and take a deep breath.