the class_name keyword is touchy and should not be thought of as being a class declaration in OO (C#,Java,C++ etc).
This is because a script that extends Spatial or Node etc can be assigned to any proper sub type of the extended node type, thus it is not a class
GDScript scripts are not class declarations but 'mixins' which are limited to the Object they may be applied to (like Node, or Spatial) by the extends statement
Consider class_name as a nickname for the script itself, which of the script must be fully loaded into the engine before the nickname can be referenced. This means that within the script itself, you can't really reference the nick name.
At least that is how I choose to think of it after starting to use class_name.
Instead of using GeoLocation use the parent Node's typename (likely a Spatial or Object)
func add(loc: Spatial) -> Spatial:
func add(loc: Object) -> Object:
Also note that memory management of Object is is manual. It isn't garbage collected. Nodes are the same way but will be automatically freed when children of another node that is deleted
I would highly recommend thinking of methods equivalent to += -= etc. as they don't imply new objects
Also I think you need to instance an object differently
see https://docs.godotengine.org/en/stable/classes/class_object.html#class-object
I suspect you should do:
var result:Object = Object.new()
result.set_script(get_script())
// do assign properties stuff after
or if you are using Spatial, duplicate self (self.duplicate() ) You don't need to set the script in this case.
note you can extend scripts by saying
extends "res://path-to-base-script.gd"