You need install UnifiedNLP as a system app to get network based location working.
However, it did not work reliably for me under LineageOS 17.1. It usually provides one location and seems to crash, but I have not investigated further.
GPS should work out of the box with LineageOS 17.1. Have you tested it with OSMand~?