A Maryland court has ruled against a proposed constitutional amendment that could have paved the way for Democrats to redraw the state's congressional districts ahead of the 2028 elections.