Pakistan, like most the world did not expect the invasion. The onus for the embarrassment should be on the Russians, for inviting a guest while launching a war on a neighbor. Considering the lengths China went to get a meeting in hopes of achieving some kind of normalization of relations between Russia and Pakistan, Pakistan could not pass up the opportunity when they were already in Russia. The last time we were this close to possibly achieving anything resembling normal relations were in the time of Ayub Khan.
IK has nothing to be regretful about for this visit because he saw the visit as a chance to reconcile relations, and hence his statement of excitement. What can be said to be guilty of, if one wants to put it that way, is thinking from the perspective of the interests of his people, who elected him to make their lives better and serve their interests.
Hopefully his team prepares a balanced and well throughout statement for his consideration, for when the PM speaks to the press about his trip, surely the issue of Ukraine will be raised, and he must be measured in his words in order to convey his intentions to achieve progress where he had the power to do so, and where, as a guest, he may not have had the power to influence his host during his trip to Moscow.