I want to add side panels/bars to replace the black edges of the screen that appear when you set the aspect ratio to "keep" similar to games like Nuclear Thrones side bars, however i have no idea how to do this. How can i add them in?

As far as I know, you can't do that automatically since the bars would end up being part of your project. You'd have to turn off all of the automatic scaling and use the Viewport.size_changed() signal to resize your game and sidebars individually. This code does something similar with three textures, representing two horizontal sidebars and a game.

extends Node2D


var ideal_size = Vector2.ONE * 400


func _ready() -> void:
	var trs = []
	var tr = TextureRect.new()
	tr.texture = preload('res://icon.png')
	tr.expand = true
	tr.rect_min_size = ideal_size

	trs.append(tr)
	trs.append(tr.duplicate())
	trs.append(tr.duplicate())

	var p = Vector2.ZERO
	for t in trs:
		t.rect_position = p
		add_child(t)
		p.x += ideal_size.x

	rescale()

	var vp := get_viewport()
	vp.connect('size_changed', self, 'rescale')


func rescale():
	var vp := get_viewport()
	var sc = vp.size.y / ideal_size.y
	scale = Vector2.ONE * sc
	var ts = ideal_size.x * sc * 3
	position.x = (vp.size.x - ts) / 2.0