I was having the same problem with python311, and got puzzled by it. Thanks to the link you provided, I understood that it's because of autolinking, I am adding /NODEFAULTLIB: python313_d.lib to supress the autolinking.
/NODEFAULTLIB: python313_d.lib