Degiro Basic account

Assalam o alaikum, I hope your fine Mufti. I have invested some money in the stock market using a broker called DEGIRO. When I first opened the account, I selected the Basic account which later I found out this account might lent my shares to other clients (I heard this is impermissible). In addition to this, when I bought shares, the companies that I invested in were non-shariah compliant (I found out this later on).

My questions are: Would I be able to retain my original investment even if my broker might have lent my shares and if the non-shariah compliant shares have gone into a loss then back into a profit?

@Mufti_Billal
@Mufti_Faraz_Adam

Can you please give me an answer to this according to Hanafi Fiqh?