Answer
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
It is permitted in Islam for a man to call his father-in-law “father” or his mother-in-law “mother” as long as he does so to show courtesy, kindness, mercy, and compassion.
Responding to the question, Sheikh Ahmad Kutty, a senior lecturer and Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada states:
In Islam, a Muslim is encouraged to have an excellent relation with everyone, especially his relatives and his in-laws.
There is nothing wrong if a daughter-in-law or son-in-law calls his or her in-laws “father” and “mother” provided the intention is clear that they do so out of respect and love. But they should clarify the issue to anyone who may mistake them for their real parents.
The prohibition you have alluded to does not apply to the above situation. It simply refers to changing the real identity of children following adoption.
For more, see these fatwas:
Relationship with In-Laws after Death of Spouse in Islam
How to Deal with Toxic-in-Laws in Islam
Almighty Allah knows best.