That has already been done. The state confiscates 3% of the gross sales price of a home in California. If you purchase another home in California, you can apply to have that money returned. If you leave the state, California keeps the 3%.
That law was passed shortly after I sold my house in San Diego (2001) and moved to Idaho. We have lots of California license plates showing up here too. There really isn't enough housing to deal with the arrivals in my area. New housing is snapped up fairly rapidly around here.
I sold in 2002 - w/ no withholding