Importing variables aliases from a plugin to a figma variable library

You are using some strange method. It should be like this:

figma.variables.createVariable(name, collectionId, resolvedType);

To set an alias:

variable.setValueForMode(mode, alias);