try_compile: Restore COPY_FILE with CMAKE_TRY_COMPILE_CONFIGURATION
Since !7626 (merged) we always look for
the "Debug" configuration's output binary from the test project.
Restore looking for the CMAKE_TRY_COMPILE_CONFIGURATION
.
Fixes: #24180 (closed)
Backport: release