WASHINGTON—The U.S. Defense Department will remove China’s Xiaomi from a government blacklist, a court filing showed, marking a reversal by the Biden administration of one of former President Donald Trump’s last actions aimed at Beijing before exiting office. The court filing said the company and the U.S. government would agree to resolve their ongoing litigation,…