Seems like this is impossible currently in gdscript.
But You can workaround it either by impelemntic static func that will return class name or use get_class() method on instanace of the object. More details here how to get the class name of a custom node - Archive - Godot Forum
Implementing static function to return class name, although requiring adding that function to every script declaring itself as a class, works.