I can set OBS 28.1.2 to Encoder Hardware (AMD, HEVC) for recording and Hardware (AMD, H264) for streaming using the output from a RX6600 (primary / discrete)
Encoding will work fine and the options remain until the pc restarts, or the monitors go to sleep. When that happens the hardware encoding options are no longer available.
The only way to get the options to return is to do a full repair install of the AMD Andrenaline driver (currently using 22.5.1).