Actually it was because my new daemon was conflicted with Apple's default pfctl daemon. So I've had to update the default pfctl daemon plist to watch paths which are changed whenever network changes. Add following to the /System/Library/LaunchDaemons/com.apple.pfctl.plist
<WatchPaths> <array> <string>/private/var/run/resolv.conf</string> <string>/etc/pf.conf</string> <string>/Library/Preferences/SystemConfiguration/NetworkInterfaces.plist</string> <string>/Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist</string> </array>
Btw, we have to enable changes in system files by $ csrutil disable
in macOS recovery mode to make changes in above plist file. (should do $ csrutil enable
after necessary changes in system files)