Only infallible when speaking from the throne of Peter. “Ex Cathedra”, on certain areas of Church doctrine.
His Marxist leanings and pronouncements are NOT “Ex Cathedra,” but his personal opinions.
Non-Catholics will be excused for not knowing this, since , sadly, many Catholics don’t know it either...
Interesting how those areas keep shrinking.