Issue with Physics2d.Linecast from moving object

I am working on a platform game and I am trying to add vertically moving platforms. The character already has a script that manages moving side to side and jumping, and that script checks whether the character is grounded by sending a Linecast from the character object to a children object that is positioned slightly below that object. If the Linecast collides with an object in the ground layer, the character is grounded.

    void Update()
    {
        float vx = Input.GetAxisRaw("Horizontal");

        float vy = _rigidbody.velocity.y;

        _isGrounded = Physics2D.Linecast(transform.position, GroundCheck.position, WhatIsGround);

        if (Input.GetButtonDown("Jump") && _isGrounded)
        {
            _rigidbody.AddForce(new Vector2(0, Jump));
        }

        if (Input.GetButtonUp("Jump") && vy > 0f)
        {
            vy = 0f;
        }

        _rigidbody.velocity = new Vector2(vx * Speed, vy);
    }

    void FixedUpdate()
    {
        if (_isGrounded)
        {
            _renderer.color = Color.red;
        }
        else
        {
            _renderer.color = Color.white;
        }
    }

I am changing the character color to red to quickly identify when the character is groundend

That works fine when the character is standing still or moving horizontally, but when the character is on a vertically moving platform, going upwards, the Linecast may not collide with the ground. The is true specially if the platform is moving fast. Another curious fact is that the character is actually made a child of the platform when it touches it, in order to be moved by its movement - which I expected could guarantee the same behavior all through the movement.

        private void OnCollisionEnter2D(Collision2D collision)
        {
            if (collision.gameObject.name.Equals("MovingPlatform"))
            {
                transform.parent = collision.transform;
            }
        }
   
        private void OnCollisionExit2D(Collision2D collision)
        {
            if (collision.gameObject.name.Equals("MovingPlatform"))
            {
                transform.parent = null;
            }
        }

I made a small prototype to simulate that issue - please see the video here. I also uploaded the code here.

All of a sudden the issue disappeared, without any updates on Unity3D. The only reason I can find is something specific to my MacOS that may have changed. If I haven’t recorded the issue, I would probably doubt myself.