Maryland CANT count DC as part of its state. DC is a federal district.
If the Blue States can enter into a compact to all cast their electors all the same way regardless of their state outcomes, I don't see why Maryland couldn't do this if they want.