He pulled a not too dissimilar stunt at the end of last year, when he refused to attend the G20 Summit in South Africa.
That was not necessarily the biggest issue, as he can boycott what he likes I suppose (it was linked to alleged racism towards white South Africans), but the major problem arose when it came time to hand over the Presidency for 2026, to USA , as they will be the host this year.
The handover is only ever accepted by a high ranking official of the Presidency, usually the President / PM of said country. Due to Trumps refusal to attend, there was no-one to handover to. Trump then sent a junior official to accept the handover, and Cyril Ramaphosa (host of 2025) refused to go against protocol and so therefore, did not complete the handover.
So it was left at the office of the Presidency for collection by the USA at a later date.
This was not taken lightly by Trump, so now in retaliation has blocked South Africa from attending the G20 in USA this year. Cyril Ramaphosa did not receive an invitation. The ridiculous thing is, SA is one of the founding members of the G20.
So we will see what transpires later this year.