Welcome Alfonso: This looks like a nice machine. I haven't experienced this with my Surface tablets. The Surface 3 has been on version 2004 since late August. I do see other references to this problem with the Flex 5, including this one:
https://forums.lenovo.com/t5/Lenovo...5-auto-screen-rotate-not-working/td-p/3848921.
This is dated, so it may have nothing to do with yours, but I though it may help if you got yours from the same retailer. There's also a recent Amazon (2-star) reviewer that cites this problem.
My only thought is that an application that you use might have (auto-)locked it for its own requirements or limitations. The link, though, suggests it is a broader problem, maybe a bad batch. Good luck, in any event.