I believe you are creating experience fragment templates using experience fragment template type.
As a developer, you still need to create template type and there you can add cq:xfVariantType property in initial content.
whenever you will create new xf template using xf template type, cq:xfVariantType property will be added to new templates.
e.g.
/conf/we-retail/settings/wcm/template-types/empty-xf-page/initial/jcr:content