Which garment was being referred to in Genesis 39 as being taken by Potiphar's wife whilst Joseph fled?
Your question cannot be answered from the biblical verses alone, as the nature of this garment is not specified, so we must turn to extra-biblical sources.
We know that all Egyptian men (besides for the king and his household) did not wear any clothing besides for a skirt, its length depending on the fashion of the specific period. See image below. This was because of the hot climate in Africa, which made too many cloths an impossibility as it would would have made them very uncomfortable working under the brutal sun. So the garment Potiphar's wife grabbed from Joseph was most probably his skirt, which may have left him naked (This would have reinforced her allegations against Joseph that he attempted to rape her. Smart lady!). However, we know that Egyptians wore loincloths underneath their skirts, so hopefully Joseph wore one as well and was left with something to cover his nakedness.
Potiphar’s wife attempted to have sex with Joseph in (Literal Standard Version) Genesis 39:
12and she catches him by his garment, saying, “Lie with me”; and he leaves his garment in her hand, and flees, and goes outside.
The dictionary meaning of this Hebrew word is rather broad, Brown-Driver-Briggs:
garment, clothing, raiment, robe of any kind, from the filthy clothing of the leper to the holy robes of the high priest, the simplest covering of the poor as well as the costly raiment of the rich and noble
So this is not so helpful to resolve the OP's question. Let's see a bit more of the context:
13 And it comes to pass, when she sees that he has left his garment in her hand, and flees outside, 14that she calls for the men of her house, and speaks to them, saying, “See, he has brought a man to us, a Hebrew, to play with us; he has come in to me, to lie with me, and I call with a loud voice, 15and it comes to pass, when he hears that I have lifted up my voice and call, that he leaves his garment near me, and flees, and goes outside.” 16And she places his garment near her, until the coming in of his lord to his house. 17And she speaks to him according to these words, saying, “The Hebrew servant whom you have brought to us, has come in to me to play with me; 18and it comes to pass, when I lift my voice and call, that he leaves his garment near me, and flees outside.”
Bach's answer is consistent with this context that the garment was probably something light and not heavy weighed and bulky.
12 She caught him by his cloak and said, “Come to bed with me!” But he left his cloak in her hand and ran out of the house.
NIV's translation of "cloak" is probably a bit too much.