Nawaz shariff was PM when pakistan won in 1992 and CT in 2017. Maybe his return to Pakistan may change the luck of pakistan and pave the way for victory.
In 1992, Pakistan had been bundled out for 74 in their group match against England. England were well on course at 24/1 when an unseasonal rain came and washed out the match. Pakistan thus escaped from a certain defeat. This defeat would have seen Pakistan getting eliminated from the race for semi final as they had already lost to India, South Africa and West Indies. This valuable point ensured that Pakistan managed to qualify for the semi final by the skin of its teeth. That was qudrat ka nizaam working in favour of Pakistan in that world cup.
One cannot expect such divine intervention in every tournament. If Pakistan's qualification in 1992 as also in 2022 T20 WC was qudrat ka nizaam then their non qualification in 2023 ODI WC is also qudrat ka nizaam. Remember, Afghanistan that defeated three WC champions and was on the verge of defeating another ex WC champion deserves a semi final place even more that Pakistan. Even they have not qualified. But one cannot find them complaining.