Do not think there is such a program.
Using a screen recording program is the common method .
Fraps and ShadowPlay are the two I am aware of.
In my experience:
Fraps splits long recordings into multiple files, and records as AVI, so the files have to be merged and converted to make a MP4 file.
ShadowPlay was superior (one file regardless of length, recorded direct to MP4). Sadly did one of their updates several months ago, and now it will not record.
Another nice thing about recording with a separate program is all the displayed fields such as current, airspeed, etc are retained.
There are probably other recording programs available, but those are the two I am aware of.