B.G 5.24
योऽन्तःसुखोऽन्तरारामस्तथान्तर्ज्योतिरेव यः। स योगी ब्रह्मनिर्वाणं ब्रह्मभूतोऽधिगच्छति ॥२४॥
yo'ntaḥsukho'ntarārāmastathāntarjyotireva yaḥ। sa yogī brahmanirvāṇaṁ brahmabhūto'dhigacchati ॥24॥
[यः अन्तः सुखः अन्तः आरामः तथः अन्तः ज्यतिः एव यः। स योगी ब्रह्म निर्वाणं ब्रह्मभूतः अधिगच्छति॥
yaḥ = Who; antaḥ sukhaḥ = inner happiness; antaḥ ārāmaḥ = inner rest; tathaḥ = similarly; antaḥ jyatiḥ = inner radiance; eva = alone; yaḥ = who;। sa = he; yogī = practitioner of Yoga; brahma nirvāṇaṁ = liberation in Brahman; brahmabhūtaḥ = being in Brahman; adhigacchati = achieves;॥]
He alone has the inner radiance whose has inner happiness and inner rest. That practitioner of Yōga being situated in Brahman attains liberation in Brahman.
Gīta Tātparya 5.24
The inner happiness and such attributes are because of the vision of Brahman.
ब्रह्मणि भूतः। अन्यथा पुनः ब्रह्म गच्छतीति विरोधाच्च। अन्तःसुखादिकं च ब्रह्मदर्शनात् ॥२४॥
brahmaṇi bhūtaḥ। anyathā punaḥ brahma gacchatīti virodhācca। antaḥsukhādikaṁ ca brahmadarśanāt ॥24॥
[ब्रह्मणि (brahmaṇi): in Brahman; भूतः (bhūtaḥ): exists; अन्यथा (anyathā): otherwise; पुनः (punaḥ): again; ब्रह्म (brahma): Brahman; गच्छति (gacchati): goes; इति (iti): thus; विरोधात् (virodhāt): because of contradiction; च (ca): and; अन्तःसुखादिकं Inner joy, etc.; च (ca): and; ब्रह्मदर्शनात् (brahmadarśanāt): from the vision of Brahman;]
The word 'brahmaṇi' goes as per grammer with 'bhūtaḥ'. Otherwise, attainment of Brahman gets repeated and is redundant and thus contrary to Sanskrit's traditional way of writing.
The inner happiness and such attributes are because of the vision of Brahman.