In my case I followed your advice, thinking like a logical human, that rooting my phone could allow myself to unlock my device (which I paid retail price from their walled garden market for pre-locked devicess, no subsidy and also following years of service) but i discovered many many months after the fact that the cellular megacorp can use their OTA update service in some instances to reverse your assertion of control over your device somehow.
I used a dodgy unlock service in a time of desperation, and would later find myself locked out from my fully paid device yet again. The handset cost as much as a crappy but roadworthy car and was paid in full.
These convoluted service lock agreements do nothing at all but ensure paying customers are beholden to the capricious will of these amoral corporate entities. The marketing and lobbying makes us think this is a good deal.
EDIT: I used an opensource rooting method, and later used a dodgy unlock service which i believe this person may have been involved in reselling.
The SIM lock methods are a little bit diferent from handset to handset, but flashing LineageOS will not unlock your handset. I know there are some handsets which the SIM Lock may be manipulated via block device, but you often have to issue dialer commands to the baseband firmware.