Thank you! I appreciate you answer. I will add a little background to clarify the issue.
I had to place robots.txt file for domain1.com in public_html because for some reason I hadn’t be able to verify the file in google search console.
I placed a separate robots.txt file for domain2.com in public_html/domain2. But sill the robots.txt file for domain1 is being served.