found a solution, at least for minecraft (haven't tested other games but i assume they'll work)
use Hyperion ScreenCapture
Releases · sabaatworld/HyperionScreenCap
Screen capture program for Hyperion ambilight. Updated to support DirectX 11, multiple displays and multiple Hyperion servers. - sabaatworld/HyperionScreenCap
github.com
it's more efficient, using the nvidia encoder and using less cpu (at least for me) and as mentioned works with minecraft