And it wasn't until the papacy of Paul VI that St. Pio was exonerated and liberated.
In the summer of 1960, the Holy Office of the Vatican dispatched an apostolic visitor to investigate Padre Pio...
...anxiety about Padre Pio stemmed from a set of audiotapes surreptitiously recorded in the monastery of Santa Maria delle Grazie in San Giovanni Rotondo that purported to document improper relations between Pio and a group of lay sisters, who formed a kind of protective guard around him. Keepers of the Padre Pio cult, they controlled access to the future saint, handled money coming in for the hospital, and appeared to have free run of the monastery at all hours.
The apostolic visitor, Monsignor Carlo Maccari, left San Giovanni unimpressed by the person of Padre Pio and horrified by the cult that surrounded him, which he thought, according to his report, smacked of “idolatry and perhaps even heresy…religious conceptions that oscillate between superstition and magic.” - Source
For a time it looked like Padre Pio would live out his remaining years being treated as a miscreant.
But Paul VI changed things around rapidly. The Pope was not averse to St Pio. As Cardinal of Milan, Paul VI had sent a request for prayers to Padre Pio in 1959. In 1964, Pope Paul intervened with the CDF and ordered that Padre Pio be allowed to practise his ministry “in complete freedom” and that he was not to be confined “like a criminal”. - Source
How did St. Pio act when he was 'imprisoned' and maligned?
Saint Pio's response:
"God's will be done,"...then he covered his eyes with his hands, lowered his head, and murmured, "The will of the authorities is the will of God." - Source