There have been several non-Anglican Prime Ministers--the non-English ones, among others--who have nonetheless been responsible for recommending diocesan bishops in the Church of England. Did anyone ever complain that the men helping to control the Church weren't in communion with it?
How far back do you want to go? Ramsay McDonald was Prebyterian, but I don't know if this came up.
In recent decades, it hasn't really, because in practice, most PMs in the modern era choose whichever Bishops the Anglican church recommends. Similar to how the Queen chooses the PM, but in practice this hasn't mattered for decades because she chooses whoever she's told to. What happens is the Anglican Church's Crown Appointment's Commision sends two names, and the PM chooses one, preferably the top one. So the fact that Jim Callaghan was officially a Baptist (though probably actually an atheist) wasn't really an issue.
The only PM who's ignored this was Margaret Thatcher, who blocked the nomination of the apparently left-leaning Jim Thompson as Bishop of Birmingham, and who suggested to the Commission, and then chose, George Carey as Archbishop (a staunch conservative with a small c). Possibly he was the lower of the two names, though that's not public. She was criticised for this, but not for being a Methodist.