John Hay and John Nicolay were Lincoln’s Private secretaries and wrote an extensive biography of Lincoln and the war. In summary, they wrote of no plan to evacuate Maryland. Lincoln and the government didn’t recognise secession. So, they certainly wouldn’t have evacuated by a political act of the vote in Maryland. Certainly the threat of a military assault was real but initially the gravity of the situation was not clear.
The safety of Washington DC was quite precarious in the first two months. A tiny attacking force could have taken the city and perhaps captured Lincoln and other senior politicians.
Lincoln called out for assistance and Massachusetts managed to quickly send a single regiment into DC to defend the city from attack. Mobs of Marylanders attacked northern forces travelling through Maryland to protect DC but that was quelled by force and by politics. Within a few weeks, thousands of troops had secured the capital.