When you play so this way, what questions can there be?? I'm absolutely not surprised, that you lost.... Neatlys and attentiveness is not your'?)) In my opinion, several mistakes or inattention were made... When you enter the game with a medium hand, look at who is on the blinds and in front of them... You are playing limp and probably blinds in the game + maybe several players. A straight-flush-draw falls on the table, you get a big bet from TWO OPPONENTS and put all-in (WITHOUT OVERLAP) higher combinations...
The first thing you can and should think about is the opponent's straight-flush-draw. Can't you see this? I think right, if you enter the game with such a hand, you should be careful and not show aggression on the flop, if you get a big bet, a good decision on a flop, it's a fold.. You can't knock a player out of the flop (if he has a draw), if you put all-in, because the size of your stack does not allow it...