Does detachment from the body and mind come only after full spiritual realization?
Are you asking that the yogis, when they attain Samadhi, is it at that time they become detached from the body and the mind? Yes.
No, not necessarily. See, detachment can come from multiple sources. One is, of course, what you said, when a person becomes spiritually realized, at that time they become indifferent from the body-mind.
But it isn't necessary that detachment has to come only when one is fully spiritually realized. Even if one understands the gravity and the urgency of life's spiritual side, at that time they may get a spiritual calling. And a spiritual calling is not the spiritual culmination.
They are not necessarily attained spiritual realization fully, but just the deep understanding of the urgency and the importance of life's spiritual side, that may also inspire some people to detach themselves from the world and focus on God. But there is another possibility that some people may just turn towards spirituality or make a pretense of turning towards spirituality just because they are frustrated with life and they want to avoid life's responsibilities. And that kind of thing is not recommended in Bhagavad Gita.
Bhagavad Gita says in 18th chapter, 6th verse that सक्रुद्वा राजसं त्यागं नईव त्याग फलं लवेद। दुखं इत्तिये वयत् कर्मः काये खलेश भयात्यजं। भयात्यजित। So if somebody simply gives up work because they find the work too troublesome and they use spirituality as a subterfuge, as an excuse for avoiding responsibility, then that is unhealthy. And that the Bhagavad Gita does not approve. So we cannot assume that just because somebody is detached, they are automatically spiritually perfected.
No. We have to look at the way they are actually living. So detachment can come because of spiritual perfection.
Detachment can come because of strong spiritual call which is the beginning or which is the starting point for journey towards spiritual perfection. Or detachment can also be a cover-up for one's irresponsibility. So we shouldn't assume that just detachment has come because of.