Camera WorldToScreenPoint() and ScreenPointToRay() produce wrong results in Unity 2022.3.8f1

I recently updated my project from Unity 2022.3.0f1 to 2022.3.8f1 and all the operations with the Camera are broken. The WorldToScreenPoint() always produces the same position regardless the given transform and ScreenPointToRay() results in a ray completely outside of the screen. Reverting back to 2022.3.0f1 fixes the issue. Here is the code part:


   void Update()
    {
        if (UIManager.currentState == UIManager.GameState.PreGame)
        {
            return;
        }
        
        if(Time.timeScale < 0.1f)
        {
            return;
        }
        
        if (!_clicked)
        {
            hand.anchoredPosition = _camera.WorldToScreenPoint(state.position + offset);
        }

        if (Input.GetMouseButtonDown(0))
        {
            Ray ray = _camera.ScreenPointToRay(Input.mousePosition);
            Debug.DrawRay(ray.origin, ray.direction * 100, Color.yellow, 100f);
            RaycastHit hit;
            if (Physics.Raycast(ray, out hit, 100))
            {
                Debug.Log("State");
                if (hit.transform.CompareTag("State"))
                {
                    _clicked = true;
                    hand.transform.SetParent(buttonGoToLvltransform);
                    hand.anchoredPosition =  new Vector3(0f,-156.5f,0f);
                }
            }
        }
    }