Inconsistency between display rotation and touchscreen coordinate rotation

I see that you do not have the same configuration, but I think it can help you to understand better the problem
Take a look here: