Private DNS not connecting on either WiFi or Mobile network

Expected Behavior

Any Private DNS server should connect on WiFi and/or mobile network.

Current Behavior

No Private DNS servers would connect(WiFi/mobile)

Possible Solution

Switching to automatic connects. Also connecting to a vpn before or after turning on private dns will provide internet access (before will work almost everytime) but the "Private DNS cannot be accessed" notification will be shown. Another thing to add is that in lineage os 17 some private dns servers would work on both like google, quad9 on mobile network, cloudflare on wifi. But after upgrading to lineage os 18 no private dns servers would connect aside from vpn.

I have seen private dns servers work on other devices on the same wifi and mobile network like A7 2018 stock android 10 or Xiaomi redmi note 8t stock android 10 so there shouldn't be any problem with the networks.logcat.txt

Steps to Reproduce

  1. Turn on WiFi or mobile network
  2. specify a private dns server in settings and hit save
  3. no internet access

/device a7y17lte /version lineage-18.1 /date 2021-08-21 /kernel /baseband /mods Google Apps

I have read the directions.