if Input.is_key_pressed(KEY_ALT) and Input.is_key_pressed(KEY_R):
var selected = EditorInterface.get_selection()
if selected is Node3D or selected is MeshInstance3D or selected is StaticBody3D:
print(selected)
For reference get_selection returns a EditorSelection type, it’s a object for handling selections within the editor, not the actual selected object(s).
Of that EditorSelection type you can use get_selected_nodes or as you found get_transformable_selected_nodes().
var selector: EditorSelection = EditorInterface.get_selection()
var selected_nodes: Array[Node] = selector.get_selected_nodes()
for node in selected_nodes:
print(node.name)