In Windows 10, go to Settings > Gaming > Captures and turn on the switch for Record in the background while I'm playing a game. While here, click the drop-down menu for Record the last to change the interval to anywhere from 15 seconds to 10 minutes.