On https://doc.qt.io/qt-5/qtquicklayouts-overview.html#size-constraints there is an empty code snippet.
The code is
and windowconstraints.qml exists in qtquickcontrols/src/layouts/doc/src/snippets/ with
with the "anchoring" snippet working just fine (lower on the page in section "Connecting windows and layouts").
So maybe those tags cannot be nested?