Sure! Here's the type of code I use for resetting a node:
var starting_transform;
func _ready():
starting_transform = global_transform;
func _physics_process(delta):
if Input.is_key_pressed(KEY_R):
global_transform = starting_transform;
It should, in theory, work with both 3D and 2D nodes. The code above is from a 2D prototype project I made, and at least in the project it works as expected.