If you have something like this - https://fxdreema.com/shared/w5Pxyrjve - then this is what happens.
When the condition is true, a new Buy trade is created
Now "If trade" is able to pass, because of that Buy trade that already exists. So it passes.
What follows is "Once per bar". This block has internal memory and knows that it was already called in the current bar. But this is the first time that this particular "Once per bar" is called, so it passes immediately
The next block is "Close trades" and the Buy trade closes
Note that "Once per bar" is working on individual level. Each one of these blocks has its own internal memory. You can call "Once per bar" block in the beginning of the bar or in the middle, it doesn't matter, it will pass once at the time its called. Here is more: https://fxdreema.com/demo/mt4-once-per-bar