How to move 2D Editor view to another position from a tool script

Godot Version

4.3

Question

I’m making a plugin where I can click a button and then zoom in and center on a node in a scene. I’m not sure how to properly transform the 2D Editor view. I’d like to center on a node and then keep the view there so I can easily go edit it and its surroundings.

I’ve tried this code as a test. It should put the origin in the upper left corner and set the zoom to 100%

	var tf = Transform2D(Vector2(1,0), Vector2(0,1), Vector2())
	view.global_canvas_transform = tf

I think it is indeed transforming the view, but as soon as I hover the mouse back over the viewport it snaps back to where it was. Additionally, the side bars with the measurements and the zoom amount don’t change on the interface. Is there an established way to achieve this?