Chapter 9 · The Royal Secret · Krishna said
Bhagavad Gita 9.23 — All worship reaches God
येऽप्यन्यदेवता भक्ता यजन्ते श्रद्धयान्विताः। तेऽपि मामेव कौन्तेय यजन्त्यविधिपूर्वकम् ॥
ye'pyanyadevatābhaktā yajante śraddhayānvitāḥ | te'pi māmeva kaunteya yajantyavidhipūrvakam ||
Meaning
Even devotees who worship other gods with faith are in fact worshipping me alone, Arjuna, though not in the proper way.