According to the discussion at https://bugs.chromium.org/p/chromium/issues/detail?id=763298, the var() function is not specced to work inside @page at-rule. However, using custom properties inside these blocks might be a reasonable requirement:
:root {
--margin: 3cm;
--width: 1024;
--height: 768;
}
@page {
margin: var(--margin);
size: calc(var(--width) * 1px) calc(var(--height) * 1px)
}
Relevant spec: https://drafts.csswg.org/css-variables/#funcdef-var