You're welcome!
I use Godot and there is an option in the project settings to preserve the aspect ratio.
I would think there is something similar in unity. Good luck!