The cause of riveted nuts that come off is to put a spacer washer that is not the diameter of the screw, the problem is the protrusion of the riveted nut which does not always allow good stability of the part fixed with the nut to correct it putting a riveted nut with countersunk head without spacer would make a more rigid fixing.