See this video about a “super-unusual” arrangement between the Jewish and Muslim communities in Northern Virginia.
I’m not certain of the juristic positions of the respective faiths on this matter, but I do recall a rabbi mentioning in an inter-faith discussion I attended that he would have no discomfort in performing his prayers in a mosque if welcomed, whereas he would not do the same in a church.