Please refer to the below thread:
https://community.shopify.dev/t/inventoryitem-has-multiple-variant-relationships