The provision of the US constitution is clear.
The original state consent for West Virginia to be split off as a new state was given by a rump pro-Union Virginia legislature, representing Union controlled parts of the state. The consent was confirmed by requiring it as a pre-condition for Virginia to be re-admitted to representation in Congress after the war.
Maine was a district of MA before statehood in 1821. It was represented in Congress as part of the MA delegation. I presume the area moved from being part of MA to a state in its own right, with no gap.