Thank you for posting to the Fortinet Community Forum.
As per your description I can understand that it was working fine and when your internet traffic switched through secondary link webfilter was not working and even the blocked category website was accessible.
So, I believe the fortiguard connectivity was down when it switched through secondary link.
Diag debug rating should be run to check the connectivity status
Please refer this link:-
And in the webfilter profile in use you must have enabled Allow websites when a rating error occurs which will allow the websites even in blocked category when the fortiguard connectivity is down.
So please check the fortiguard connectivity post which your issue will be resolved.
Please refer the link below:-
Let us know if this helps.
Salon Raj Joshi