BUILD_TYPE not set during `cmake --install`

FYI. After adding more debug output to the cmake_install.cmake file, I found:

cmake --build Build/build64/VS2022 --config "Release" --target install

sets BUILD_TYPE

and

cmake --install Build/build64/VS2022 --config "Release"

does not set BUILD_TYPE but passing in the command argument -DCMAKE_INSTALL_CONFIG_NAME

With this information I was able to hack together a workaround of

CMAKE_INSTALL_PATH=<path>/\${BUILD_TYPE}\${CMAKE_INSTALL_CONFIG_NAME}

that works for both install modes.

Still, this feels like it might be a defect.