The Shulchan Aruch came about, because its author, Rav Yosef Karo, declared that the era of the Rishonim has ended, and one can no longer make halachic decisions based on one's interpretations of the Gemara, but rather on the basis of the interpretations and rulings of the Rishonim (the Halachic authorities of the several hundred years before his time).
Thus, Rav Yosef Karo developed a system of compiling the different opinions of the Rishonim, and of how to rule in cases of disputes between them. While his specific guidelines of how to rule in cases of disagreements amongst the Rishonim, as well as many of his rulings, were highly disputed by the Remma and later commentaries of the Shulchan Aruch, the basic idea that we should analyze the different opinions in the Rishonim and strive to reach an halachic ruling on that basis, was accepted.
Thus when we say the Shulchan Aruch was accepted, we mean the Shulchan Aruch with all of its commentaries was accepted. This is because it is the basic premise of the Shulchan Aruch that was accepted and the many Halachic works surrounding it, and not necessarily all the specific rulings in the Shulchan Aruch.
Thus, even though Halachic works continue to be published, even as separate books and not as commentaries to the Shulchan Aruch, they are all based on the Shulchan Aruch and its commentaries, which in turn are based on the Rishonim, which in turn are based on Chazal.