As said, don't annex them again. This will increase bad boy, which will lower loyalty, and you end up in a rebellion spiral of death.
Important thing is to be at peace. The trait won't go away while you are at war. So settle peace fast 8either by letting them go independent, or force vassalize them, which is BB neutral).
Try to keep whatever vassals you might have left on good terms. If someone rebels again, make sure to end the conflict soon, to increase your time at peace between rebellions (because they will happen) and thus increase the likelyhood of the event firing that removes Realm Duress.
you can also hope for the death of your ruler, who will take the trait with him to his grave. Though his heir might get the event if there are still rebellious vassals causing trouble.
It is your vassals who give you Realm Duress in certain situations. Vassals with the 'Rebellious' trait can generate discontent and loyalty hits amongst your other vassals, and eventually they can get an event to start a civil war, at which point your ruler will get Realm Duress, making the who situation much worse.
You will probably have to live with constant rebellions, and losing some of your realm who breaks free. But don't worry too much about that. You get free claims, and later on you can have fun getting your realm back together again
But yeah, it can be frustrating to get ... try getting it for your infant ruler, who just took over 5 kingdoms. Fun times ahead.