get_used_rect() Returning a value larger than expected

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Illyas_Onii

hello! I’m following this tutorial here on automatic camera limits:

And it seems that there is some misunderstanding on my part on how the get_used_rect() script works.
Just like the video, here is my code:

var tilemapRect = get_parent().get_node("Ground").get_used_rect()
var tilemapCellSize = get_parent().get_node("Ground").cell_size
$Camera2D.limit_left = tilemapRect.position.x * tilemapCellSize.x
$Camera2D.limit_right = tilemapRect.end.x * tilemapCellSize.x
$Camera2D.limit_top = tilemapRect.position.y * tilemapCellSize.y
$Camera2D.limit_bottom = tilemapRect.end.y * tilemapCellSize.y

however when I print out the values of tilemapRect, it prints out this:

(-1, -1, 97, 33)

now to my unerstanding, it returns a value based on tiles, like for example top goes based on the top left most block, and returns its position on the tile grid.
This is correct for the top and left side, which the top left most is -1,1. However the problem arrises with the right side, where it is 97, 33. I don’t have a block on this position, yet it prints that I do, and calculates based on this and goes way to far right and way to far down. Have I done something wrong, or is there an issue here?

enter image description here