Sand is basically finely ground rock. That doesn't seem like an insurmountable technical problem by today's standards.
The problem is two-fold. Features and cost.
1) Not all sand is equal. Not noted here but covered in a recent Planet Money podcast is that the sand that is stolen often has characteristics that make it particularly popular for why it's being stolen. The stolen sand often has a color or texture that makes it wanted elsewhere. For example: much of the beach sand is uniformly the same shape (cubic) and size. This makes it ideal for construction, where a powdery, desert sand wouldn't work. While you can sieve crushed rock to any uniform size, sand is also hundreds of different kinds of "rock": calcium, silicon, and some of it with substructure that changes its characteristics further.
2) It's cheaper to steal (or "buy") than to make. From the podcast, one poorer neighborhood came out one morning to find that much of the public beach had been carted away in the night. Some sleuthing found that a nearby hotel development had a crappy beach, and taken off with it. While some science showed that the sand was "theirs", in many parts of the world with pretty beaches, courts and police are susceptible to bribery or threats. In the story, it leaned more on threats and soon the case waned and the locals had a beach of mud. For the price of a few trucks and a few thugs, the hotel owner got a brand new beach that dramatically increased the value of their property.
While technology COULD solve this problem, it really can only pull this off if you can get the cost to below that of hired force. That's what a lot of the tragedy of the commons come down to; if you can benefit by being a greater asshole and escape the consequences, then you win.