A main A road near the Welsh border will close overnight on Sunday for scheduled works.