Pelosi's reference to the Taiwan Relations Act (TRA) is probably not coincidental here. The Act (which was also passed in 1979 with a "veto proof" majority) contains some changes relative to the communique. In particular 22 USC § 3301(a)(2) authorizes "the continuation of commercial, cultural, and other relations between the people of the United States and the people on Taiwan". The substitution of "other relations" makes official visits not illegal by US law.
The TRA was adopted after president Carter unilaterally binned the Sino-American Mutual Defense Treaty that had provided defense guarantees to Taiwan.
There are other differences between the communiques and the TRA, in particular, the latter made the US diplomatic relations with the PRC rather conditional on China sticking to a policy of peaceful resolution of the Taiwan situation (at 3301(b)(3)).
These differences/points were reaffirmed over time by Congress, e.g. in a 1990s resolution that (according to Wikipedia) was countersigned by pres. Clinton, and which essentially complains that China hasn't abandoned their threat to use force:
Whereas April 10, 1999, will mark the 20th anniversary of the enactment of the
Taiwan Relations Act, codifying in public law the basis for continued
commercial, cultural, and other relations between the United States and
Whereas when the Taiwan Relations Act was enacted in 1979, it affirmed that the
United States decision to establish diplomatic relations with the
People's Republic of China was based on the expectation that the future
of Taiwan would be determined by peaceful means;
Whereas officials of the People's Republic of China refuse to renounce the use
of force against democratic Taiwan; [...]
Wikipedia cites a 2004 position of the PRC that the Taiwan Relations Act is "an unwarranted intrusion by the United States into the internal affairs of China".
China was sticking to their viewpoint that the communiques were guiding posts, while the US [Congress & later presidents] has/have basically long abandoned the communique wording.
China has been firmly opposed to the unilateral enactment of the Taiwan Relations Act by the United States in 1979, regarding it as openly violating China's sovereignty, Foreign Ministry spokesperson Zhang Qiyue said on July 18 .
"We expressed strong dissatisfaction and opposition towards the US House of Representatives for its neglect of the principles of the three Sino-US communiques and the basic standards of international relations," said the spokeswoman.
The resolution fabricated the Chinese military threat and advocated selling weapons to Taiwan and raising the US-Taiwan relationship level, she said. [...]
It must be pointed that the three Sino-US communiques are the political foundation of Sino-US relations as well as the guiding direction for the two sides to deal with Taiwan issues, Zhang said.
I'm rather sure the more recent, Xi era declarations on the TRA are probably more acerbic than that.
And it's also not first visit that the PRC complains about, e.g. in 2000 they wrote:
Scarcely three months after the establishment of diplomatic relations between China and the United States, the U.S. Congress went so far as to pass the so-called "Taiwan Relations Act", which was then subscribed by the President to become effective. A domestic legislation of the United States as it was, this Act contained many clauses that contravened the communiqué on the establishment of diplomatic relations between China and the United States and the principles of international law, and seriously harmed the rights and interests of the Chinese people. [...]
In September 1994 the U.S. government adjusted its policy towards Taiwan and did many things in contravention of the three Sino-U.S. joint communiqués. What was particularly serious was that by going back on its word, the U.S. government permitted Lee Teng-hui to visit the United States in June 1995. This changed the policy of previous U.S. administrations on prohibiting Taiwan leaders from visiting the United States and seriously impaired the relations between China and the United States.
While visits by House Speakers to Taiwan have been rare, there was one by Speaker Newt Gingrich in 1997. But no other visit of this caliber has happened in the intervening 25 years.
Pelosi, who is well-known critic of China when it comes to democracy (she protested in Tiananmen square!) certainly did her best to make the visit look as official as she could; this included travelling on an US Air Force passenger jet and including some other high-level congressional figures with her.
Pelosi said her delegation has "heft," including Gregory Meeks, chair of the House Foreign Affairs Committee, and Raja Krishnamoorthi from the House Intelligence Committee.
On the other hand, the White House and in particular the defense establishment were not exactly pleased with this visit (according to the Washington Post):
Virtually all the senior members of President Biden’s national security team have privately expressed deep reservations about the trip and its timing, said a White House official, who spoke on the condition of anonymity to discuss internal deliberations.
Jake Sullivan, Biden’s national security adviser, spoke with his Chinese counterpart to defend Pelosi’s right to visit — as did other high-ranking officials — but even so did not think the trip was a good idea, the White House official said. Sullivan expressed concerns about Pelosi’s trip to multiple administration officials and asked for suggestions on how to dissuade her from traveling to Taiwan.
Also from about a week ago:
The President let slip last week that the US military was opposed to Pelosi visiting Taiwan now, but the White House has refused to expand on his comments.
Finally, the White House raised the usual/obvious points about separation of powers:
Kirby confirmed moments later that Biden had specifically raised the topic of Pelosi’s unconfirmed trip with Chinese President Xi Jinping last week, during a video call that lasted more than two hours.
Biden “made clear that Congress is an independent branch of government and that Speaker Pelosi makes her own decisions, as other members of Congress do, about their overseas travel,” said Kirby. “That was made clear.”
Moments after saying Biden and Xi had personally discussed the trip, Kirby again sought to downplay its importance.
“I think we’ve laid out very clearly that if she goes — if she goes — it’s not without precedent. It’s not new. It doesn’t change anything,” he said. “We’ve not ramped up the rhetoric. We’ve not changed our behavior.”
On the other hand, some commentators (cited in that piece) said that this might not come across as particularly credible since Biden himself has been more explicit that other US presidents from the past few decades about defending Taiwan militarily (although that too was debated what he meant exactly).
One final issue is that the US Congress has more recently (2018) passed the Taiwan Travel Act and this (in CRS' summary)
states that it should be U.S. policy to: (1) allow U.S. officials at all levels to travel to Taiwan to meet their Taiwanese counterparts (2) Allow high-level Taiwanese officials to enter the United States under respectful conditions and to meet with U.S. officials [...]
Needless to say, China declared itself "strongly dissatisfied" with that bill as well, as Wikipedia quotes the Xinhua news state agency.
I suspect Pelosi didn't want to refer to this latter law (and referred to TRA instead) because it was passed during a (recent) Republican controlled Congress (Paul Ryan was Speaker then); she became Speaker again in 2019.