Hi, I had exactly the same problem like you and tried all the possible solutions you mentioned. However, after an hour of
searching how to grant certain permission to tasker or secure settings, I found that there is an option in system WLAN settings
(in settings app -> WLAN -> MORE) called "Ask to use WLAN". I turned it off, problem SOLVED! I don't know whether this
option is ROM related. My device is Samsung S6 Edge using a custom rom. Hope this helps!