You can sell land with all the deed restrictions you want, but you can’t force the buyer to honor those restrictions. Land comes with a bundle of rights. One of those to legally use the land as you see fit.
“Dedicating land for use as a park is not illegal.”
Of course it’s not illegal. The buyer can choose to honor deed restrictions, but the buyer is not required to do so.
Correct again, but the transferor, or their heirs, can go to court to get title back. If they demonstrate the restriction has been violated and the judge agrees, they win.
My grandfather always used to say “You don’t get arrested for stealing, you get arrested for being caught.”