We did it in WWII - June 14, 1941, Executive Order 8785 basically shut down Europe. Prior to that, we were also seizing assets of countries that Nazi Germany took over, to protect their assets and prevent them from falling into German hands. We were trying to somewhat stay neutral, but we were also not going to let the Germans have anything we could get our hands on.
https://www.presidency.ucsb.edu/documents/executive-order-8785-regulating-transactions-foreign-exchange-and-foreign-owned-property
And with Japan, we did quite a bit as well which arguably sped up Japan going to war against us (seizing/stopping 88% of their imported oil put them on a course to run out of fuel within a few years).
https://www.history.com/this-day-in-history/united-states-freezes-japanese-assets
If you want to do a deep dive on numbers, etc.
https://govinfo.library.unt.edu/pcha/PlunderRestitution.html/html/StaffChapter3.html