Gas Shut Off Location

Is there a reference code regarding the placement of a gas shut off valve within the furnace cabinet. I think it should be mounted outside of the cabinet.

xxxx

This wording should help.
12. SHUT-OFF VALVES: Valves used in connection with gas
piping shall be approved types. An accessible approved shutoff
valve shall be installed in the fuel supply piping outside of
each appliance and ahead of the union or connector within 6
feet of the appliance and in the same room.

For manufactured homes you have to use the HUD standards as most gas piping comes up from the flooring straight into the furnace cabinet. Shut offs are located in the compartment.

The installation you are showing would be failed by any AHJ in my area, if properly inspected, and caught by the inspector.
As for HUD/FHA,etc. standards, I doubt they require that type of shut-off installation, especially when the typical gas appliance Manufacturer requires the shut-off be installed outside the appliance.