Mask out that area that the flag is in.
AI isn't perfect and will be problematic with some field of views.
Well personally I would lower the camera as well so that the flag isn't even in the field of view and get more face shots instead of top of head.
Or train your own model with your field of view.
What camera is this? Does it have built-in AI?
Keep in mind CPAI is grassroots being developed by people for free. It won't compare to a company paying staff to create AI detection for their cameras.
CPAI is getting better all the time, but most of us have found camera AI is better at the moment.