Gear that's equipped by the bot is usually handled by your Auto-Equip logic.
Not by the profile. It can be turned off via "Settings & Tools."
That aside, in very rare situations - the Sell All Lua may replace your gear.
There's checks to make sure the vendor menu is open, but if in the situation the vendor disappears/dies/etc while the items are being sold - the items will be placed on your character.
Lost gear can be retrieved by going to the automatic item restoration page(s.)
US: https://us.battle.net/support/en/article/battle-net-item-restoration
EU: https://eu.battle.net/support/en/article/battle-net-item-restoration
So I noticed that the first time it did this to me, I did have Auto-Equip option enabled. But this incident just occurred again, this time under one of those rare occasions that you mentioned.
I also am trying to use the link you sent me to restore my items, but I don't know if I just have long list of vendor'd items, or if I am just unable to view that one character's list of lost items.
When I try view other characters lost items it shows them instantly.
I decided to open up a ticket and stop botting in the mean time. Do you recommend against this or have any other options for me to choose?