help with scroling backgrounds

I’m trying to create a scrolling background it works fine on 720p but when scaled to 1080p I get a gap between the images

public class Main_menu
        private Texture2D _background1;
        private Texture2D _background2;
        private Vector2 _background1Pos;
        private Vector2 _background2Pos;
        private float _speed;
        private Vector2 _scale;
        private Vector2 _HD;
        private Vector2 _FULLHD;

        public Main_menu()
            _background1 ??= Globals.Content.Load<Texture2D>("backgrounds\\backgroundEmpty");
            _background2 ??= Globals.Content.Load<Texture2D>("backgrounds\\backgroundEmpty");
            _HD = new(2.25f, 1.5f);
            _FULLHD = new(3f, 2f);
            if (Globals.windowheight == 720)
                _scale = _HD;
            else if (Globals.windowheight == 1080)
                _scale = _FULLHD;
            _speed = -100f;
            _background1Pos = new Vector2(0, 0);
            _background2Pos = new Vector2(_background1.Width * _scale.X, 0);
            Console.WriteLine("{0}, {1} , {2}", _HD, _FULLHD, _scale);
            Console.WriteLine("{0}, {1}", _background1.Width * _scale.X, _background1.Height * _scale.Y);

        public void Update(GameTime gt)
        {   //scroling background
            _background1Pos.X += _speed * (float)gt.ElapsedGameTime.TotalSeconds;
            _background2Pos.X += _speed * (float)gt.ElapsedGameTime.TotalSeconds;
            if (_background1Pos.X <= -_background1.Width * _scale.X)
                _background1Pos.X = Globals.windowwidth;
            if (_background2Pos.X <= -_background2.Width * _scale.X)
                _background2Pos.X = Globals.windowwidth;
            //debug info
        public void Draw()
            Globals.SpriteBatch.Draw(_background1, _background1Pos, null, Color.White, 0, Vector2.Zero, _scale, SpriteEffects.None, 1);
            Globals.SpriteBatch.Draw(_background2, _background2Pos, null, Color.White, 0, Vector2.Zero, _scale, SpriteEffects.None, 1);

because your 2 background images are not synced.

Either syncronize them by using some sort of divider being the “scrolling” part and align the two backgrounds on each side of it (so both use the same positional reference - which in that case would be the divider)

or if you want to leave it how you do it, add the remainder to the position, when switching it to the other side.

instead of

_background1Pos.X = Globals.windowwidth;

do this

_background1Pos.X += (_background2.Width*_scale.X) * 2;

not sure about the last bit, just add as much as it would need to go where it should. the Point is to keep the remainer of the if, because it is SMALLER than the left limit, not EXACTLY the left limit because of scale