Resets. I did Oman trading republic, and I know whereof I speak. As monarchy, this country is more successful, even taking into account their national ideas. For other Muslim countries this reform even more futile.
Functionally a re-elected ruler is a new ruler with the same name.
I just checked, and for me Piety does NOT reset when I reelect, which is how it should be.
I suppose I might be missing something specific about your circumstances so that it does reset for you, but I can't really think of anything..