Following the below guide for a custom AuthorizationHandler - single handler for a single requirement.Use a handler for one requirement
However, the HandleRequirementAsync() is called twice - which may be the source of this problem.
The component named AuthWithPolicyDbAccess uses the policy.The handler code defined in SpecialFlagHandler.cs.I tried the rendermode directive to disable pre-rendering, but the Handler was still called twice.
Source code is at GitHub repo