The export profile says libx264. But “Use hardware encoder” is checked which changes the codec to h264_nvenc. The conversion is where bf=0 is getting set. B-frames are sometimes disabled or set to zero with some hardware encoders because the hardware doesn’t support them or has problems.
Two options:
Turn off hardware encoding so the export actually uses libx264
Change the export preset to use h264_nvenc so that the bf=2 isn’t getting reset when converting the software codec to a hardware codec
You are right! Changing codec from libx264 to h264_nvencfix the problem! But should be still addressed, because affect also all built-in export profiles.