Flashlight Native Issue (Maybe)

While not free aiming
Im having an issue where the native SetFlashLightEnabled(ped, false) does not work after SetFlashLightKeepOnWhileMoving(true) has been called.

However, when calling SetFlashLightEnabled(ped, true) it does turn on.
Take a look at the video below to see what I mean, you will see a new message in chat every time I press E to turn the flashlight on or off.

[click here if the video doesnt load]

Code Used:

local ped = PlayerPedId()
local plr = PlayerId()


    while true do

        if IsControlJustPressed(0, 54) and not IsPlayerFreeAiming(plr) then
            SetFlashLightEnabled(ped, not IsFlashLightOn(ped))

-- 54 | Weapon Flashlight Key

I know “persistent” flashlight scripts exist, but the purpose of this post is to find out why this behavior occurs, if its a native issue or something that cant be fixed, etc.