Actually that law was extremely nuanced, had certain exemptions to it, did not affect free blacks already living there, and permitted a substantial grace period (a year IIRC). Compare that to Illinois where virtually ANY black who entered the state's borders and remained for more than about a week was automatically a criminal who could then be sold at public auction into indentured servitude. Before the war Maryland seems to have been the best place for free blacks to live as indicated by the fact that it had the largest free black population.
You know very well that there were plenty of free blacks in Illinois throughout the 1800s. And the other northern states as well.
I thought the largest number of free blacks was in Louisiana.
Article IV, Section 19, Constitution of the Commonwealth of Virginia:
"Slaves hereafter emancipated shall forfeit their freedom by remaining in the Commonwealth more than twelve months after they become actually free, and it shall be the duty of the General Assembly to prescribe proper regulations for reducing such negroes to slavery."
Where are the exemptions?
...did not affect free blacks already living there...
But could have. Article IV, Section 20, Constitution of the Commonwealth of Virginia:
"The General Assembly may profit the future emancipation of slaves, impose such restrictions and conditions as they shall deem proper on the power of slave owners to emancipate their slaves; and may pass laws for the relief of the Commonwealth from the free negro population, by removal or otherwise."