It was reported on Firefox on https://bugzilla.mozilla.org/show_bug.cgi?id=1790652 but also affects WebKit. See testcase at: https://bug1790652.bmoattachments.org/attachment.cgi?id=9294477 The square should be green after the iframe resizes.
<rdar://problem/100398339>
*** Bug 253938 has been marked as a duplicate of this bug. ***
The WPT is at https://wpt.fyi/results/css/css-contain/container-queries/viewport-units-dynamic.html?label=master&label=experimental&product=chrome&product=firefox&product=safari&aligned&view=interop&q=label%3Ainterop-2023-container