Tried your code on a ready entity of my project, and indeed, @var anchors: Array[Anchor] can't be exported if it's in the same script.
What you could do, however, is initialize anchors as an empty array, @export var anchors = [] - This solves half of the problem, as you still won't be able to add Anchor objects within the editor, because they "don't exist".
The likely solution in this case is making that Anchor class a standalone .gd file and add it to the Autoload list (Project Menu -> Project Settings -> Autoload tab). With this done, your original @export var anchors: Array[Anchor] will now work, because now that Godot autoloads it (makes it globally accessible), it "exists"