Canvas blocks clicks on background canvas

I have a scene where I use 2 canvases:
1 canvas is Screen Space Overlay and have 3 zones-images where pointer can enter to blend between cameras
2 canvas is world space and have buttons to do some logic

Problem is that images of first canvas blocks raycasts and doesn’t call IPointerHandler on graphics behind.

The only solution I found is to create own eventData and make raycast through all:

private bool IsPointerOverClickableElement() {
    PointerEventData eventData = new PointerEventData(EventSystem.current);
    eventData.position = PointerPosition;
    List<RaycastResult> results = new List<RaycastResult>();
    EventSystem.current.RaycastAll(eventData, results);

    foreach (var result in results) {
        if (result.gameObject.GetComponent<IPointerClickHandler>() != null) {
            if (!result.gameObject.CompareTag("MobileButton")) {
                return true;
            }
        }
    }
    return false;
}

But its still feels bad because it doesnt work with IPointerEnterHandler etc.

There are a few ways to configure this behavior.

  1. Does the canvas has a Graphic Raycaster object? What are the values for Blocking Objects and Blocking Masks?
  2. Next, you could do the raycast yourself and get all the objects and decide what to do with it:
Vector3 mousePos = Input.mousePosition;
Vector2 worldPos = cam.ScreenToWorldPoint(mousePos);
RaycastHit2D[] hits = Physics2D.RaycastAll(worldPos, Vector2.zero);