Also, keep in mind, there isn't anything illegal about copying manufactured products, as long you don't violate the time frame of the patents and repackage your product with a similar name and symbol.
The Su-27 was delivered in 1984. So it is not illegal to copy it as long as you don't copy any upgrades within the time frame of a legal patent.
That's why we have generic drugs, once a patent runs out on a drug, another manufacturer can copy the product and sell for much cheaper. As long as they don't repackage it using a similar name or symbol of the original manufacturer.
I don't doubt that there are patent violations in China. But there are also parts of copying that is legal. And the Chinese may have refused the final Su-27 because the Russians didn't offer them the latest version of the Su-27 (I admit, I'm speculating here). But I find it hard to believe, that the Russians are pure as the driven snow on this one. They seldom are when dealing with the rest of the world.
To me it is not that much important. Working with Sukhoi kits given Chinese an idea on that is it a 4th gen fighter aircraft but they still unable to reproduce it’s 4th gen engines which is a 70s technology. At some point things are getting too advanced to copy&paste, you need complex knowledge to make it work.
China is decades too far from the edge which is a 5gen aircraft today.