I'd bury it just enough to hide it, that was whatever is digging will hit it but won't think to back up and dig further away. If the edge can be seen a racoon is smart enough to pry up the edge. Don't have to bury it much, this is how I did mine
Edit: half inch hardware cloth is the material of choice for most
We basically did the same thing with the 1/2 hardware cloth and went down 8 inches then out 8 inches where we could. We do have raccoons where we live and it is always better to be safe then sorry. The top is fully covered with the hardware cloth (welded wire). Our run is about 10 x 20' so lots of room for them when they are not out free ranging.
Time and money were not on our side when we did this but we are so glad we just went for it. No regrets.