It turns out that I was wrong, this does work except for the viewBox which is a typo.
So this works fine:
<svg width="100" height="100" viewbox="0 0 100 100">
<rect x="50" y="50" width="0" height="0" stroke="black" stroke-width="1">
<animate attributeName="x" from="50" to="0" dur="5s" repeatCount="indefinite"
values="50;0;50" keyTimes="0;0.5;1" />
<animate attributeName="y" from="50" to="0" dur="5s" repeatCount="indefinite"
values="50;0;50" keyTimes="0;0.5;1" />
<animate attributeName="width" from="0" to="100" dur="5s" repeatCount="indefinite"
values="0;100;0" keyTimes="0;0.5;1" />
<animate attributeName="height" from="0" to="100" dur="5s" repeatCount="indefinite"
values="0;100;0" keyTimes="0;0.5;1" />
</rect>
</svg>
Was it checking if I was paying attention?
And this realization happened after I made tools export animations to RAWR instead. Oh well, perhaps I’ll play with SVG animation at a later date.