You can do that, though just know that you'll have to spawn two separate encoders, and for the stream encoder it'll have to resize the output image on the CPU to 720p, which requires a little bit of extra CPU usage.
Of course if you're using NVENC or QSV for either the stream or recording then your performance won't really be hit at all.