I would love to use the container query on the subgrid but it seems like it's breaking the subgrid functionality. Try to uncomment "container-type: inline-size" on the subgrid and see how the layout breaks. Note: This is just a simple markup for demonstrating the issue, nothing more, nothing less.
Please especially take a look at the rows behaviour.
Happy for any explanation or even better, solution.