Treaties are very easy to repeal, on a legal and technical level. The difficulties are more symbolic and political. All states have a stake in other states respecting their commitments towards them, more and more so as they enter additional treaties.
But in that case, the treaty itself is secondary. Ongoing regulatory alignment is only good if it grants the UK some economic benefits through a better access to the single market. So the UK would still be in the same position than it is now: Under constant pressure to follow EU rules and precedents, lest it puts the whole agreement into jeopardy.
The EU is going to insist on some enforcement mechanism (there have already been many declarations on that) and it would need to periodically evaluate how much the UK is diverging. The UK increasingly ignoring EU rules would be a major technical and political threat to the single market and would force the EU to push back (although the EU might conceivably be reluctant to be the one officially denouncing the agreement so who knows what would happen…).