Collision detection does not work unless both are rigidbodies

So basically I have situation where one gameOboject[41902-screenshot-25.png**|41902]**
**
Here’s img explaining what happens.
However when I apply rigidbody for gameObject and disable use gravity and freeze all axis it fixes everything, but I strongly believe that rigidbody in this situation is complete overkill and that it reduces my performance.
Any alternatives?__

if you need to make both move up, transform both their positions on click rather than a collision. If you want a collision, you can make the one you want without a rigidbody to be a trigger, if triggered, transform.position.

if(Input.MouseButtonDown(0))
{
a.transform.position = **insert desired vector**
}

on case if a collision

void OnCollisionEnter(Collider col)
{

col.gameObject.transform.position = **vector here**;

}

again this will need debug to your situation such as possibly a bool, but none the less, it is achievable in various ways.

Hope I understood your question, and above all, hope this helps!