To begin, download the less files from GitHub and then locate where the height is specified. Upon examining the files, I discovered that the height is initially set in navbar.less on line 22:
min-height: @navbarHeight;
It is evident that a variable is used to define the height. Further inspection of the same file reveals that this variable is utilized multiple times to establish various heights within the navbar. The most straightforward solution would be to modify the value of this variable, which can typically be found in the variables.less file. Simply adjust it to your desired height and recompile your bootstrap.less.
In the event that you decide to update your Bootstrap version, you should be able to retain your variables.less file and only make changes to the remaining files for the new version. This is of course assuming that no new variables have been introduced in the update.