After copy_directory, the content in dSYM is changed

I am using cmake3.20.1. My CMakeList.txt looks like below:

add_custom_command(TARGET ${target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory “$<TARGET_FILE:${target}>.dSYM”

After the copy, the copied dSYM size is changed. Sometimes the size is 0, sometimes the size is much smaller than the orginal one. If you dig into the copied dSYM file, you can see that the dylib in the dSYM is 0.

Did anyone ever meet such issues before? Do you have some suggestions or workaround?