BIS_fnc_ambientAnim uses this list of NVGs to remove NVGs from units:
if (_gear != "ASIS") then { { _unit unassignItem _x } forEach [ "NVGogglesB_grn_F", "NVGoggles_tna_F", "NVGogglesB_gry_F", "NVGoggles_ghex_F", "NVGoggles_hex_F", "NVGoggles_urb_F", "nvgoggles", "nvgoggles_opfor", "nvgoggles_indep" ]; };
This prescriptive approach means the function doesn't work with any mod or CDLC NVGs, or even any vanilla NVGs added after Apex.
There is a simple fix:
if (_gear != "ASIS") then { _unit unassignItem (hmd _unit); };
This would make the function work with any item in the NVG slot, instead of only specific classes.