Using events that disable the drag and drop behavior of the object, stops the object. But it'll also make it immovable afterwards. So you have to add events that will re-enable the drag and drop again.
Not sure if this will work but try this anyways.
Make an event where the conditions are
-Gold bar is above the brick bar(that is gold.Y is less than brick.Y as Y decreases as you go up)
-Brick is overlapping gold(brick comes in contact with gold, similar to collision)
Make an action where it disables brick drag and drop.
Now this will stop the brick in it's tracks but you'll notice you cant move it anymore.
Now this might only work if you have preview over lan to your phone cause you'll have to use the touch objects accelerometer option. By seeing if you swipe up or down you'll get positive or negative values for the accelerometer value.
So say if you swipe up you get a negative Y accelerometer value (i'm not sure if it's negative or posotive, you'll have to find it out) So what you can do is add the condition(to the one i already mentioned) 'touch Y accelerometer value is less than 0 i.e negative. So now if it works it'll still disable movement if you swipe up and the gold is above brick
Now to reenable movement , you make another action where conditions are
-Gold above brick or Gold is not right below brick
-Brick is overlapping gold ( if it is already overlapping )
-touch Y accelerometer is greater than zero i.e positive
And the event is, enable drag and drop for brick
So now if this method actually works, when you swipe down and the gold bar is not below the brick, it should re-enable movement.
Touch accelerometer does not work on desktop. So i'm not sure if this will work at all. Sorry
Obviously putting Gold above brick conditions is not the only one, if the gold is to the far right and the brick is to the far left , it'll still disable movement even tho gold is not right above brick, so you have to add other conditions like comparing distance between the two.
Please look around the tutorials, search for keywords, cause there will definitely be a more simpler and working answer.