In order to understand this its important to understand how actually commercial banks contribute to money creation. It is true that commercial banks are part of money creating process but I think that you misunderstand the way in which they are part of it. When you go to commercial bank to get a loan commercial bank neither domestic or foreign is allowed to just create the money for that loan out of thin air. Only central bank can do that.
Rather the money creation process works in a way that central bank creates base money and in addition also allows commercial banks to borrow from it newly created reserves. Afterwards, the commercial banks help to multiply the base money due to fractional reserve system. For example, if fractional reserve requirement is $10\%$ that means that if a person deposits $\\\$100$ into the commercial bank they are allowed to lend out $\\\$90$ and keep $\\\$10$ as a reserve. Afterwards when the person who borrowed $\\\$90$ deposits them (or spends them and someone else deposits them), bank will again be allowed to keep only $\\\$9$ as reserve and lent out $\\\$81$. In this way eventually up to $\\\$1000$ of new money can be created. This process is reversed once the loan is being paid back. The point is that commercial banks cannot simply create the money out of nothing so their domestic/foreign status does not matter that much.
Foreign commercial banks can make loans in dollars by simply first entering the forex market, buying some amount $X$ of dollars and then lending that amount to its customers. Alternatively foreign bank can also borrow dollars from other bank that has them and then lend them further. When we talk about dollars in particular foreign banks have even access to federal funds market (see this Fed Cleveland explainer) so they can borrow from there as well.