The word ('unlawful' or 'against the law') used by Peter, in Acts 10:28, or at least the word reported by Luke, as used by Peter, is αθεμιτος athemitos which is only used one other time in scripture, by Peter (again) in 1 Peter 4:3 where he admits that :
... the time past of our life may suffice us to have wrought the will of the nations (or, Gentiles) when we walked in ... abominable idolatries. [KJV]
It is remarkable that Peter, a Jew, says 'we' counting himself among such as had committed such things as the whole list, and the abominable idolatries as well.
The word is not what one might have expected. One might have supposed that nomos would have been used. But it is not.
The word is, of course, a negative but I cannot find the corollary ever used in scripture which is not θεμιτος themitos but (so my Liddell & Scott tells me) θεμιστος themistos which means 'agreeable to law'. It is stating that there is an understandable divide between persons keeping law and persons not keeping law.
But Paul has much to say in the first three chapters of Romans about the hypocrisy of supposed law-keepers, who do not actually keep it, and the tendency of non-law-keepers to conform, to some extent, to sensible conduct anyway. And there are lessons to be learned by both in what Paul expounds throughout Romans dealing with the very large issue of Jew and Gentile.
I would say that 'not agreeable to law' is not exactly the same as saying 'unlawful'.
Law does not 'agree' or 'disagree' to anything. Law just states law.
The word used by Peter would appear to have the meaning 'not agreeable to persons following law'.
Thus, considering Peter's careful use of a word only ever twice used in scripture (and that both times by himself) and considering the context of Peter being taught by a vision to be careful about what he called 'common' or 'unclean' and considering the second context in his epistle where he is counting himself, a Jew, as guilty - to some extent - of Gentile sins or at least of such tendencies, perhaps, it would seem that Peter is treading carefully.
'Disagreeable to law-keeping persons' is not stating that there is a definite Law which forbids Jews and Gentiles congregating together.
One could say a lot more about the history of Israel, about the development of the Gospel, about the bringing in of Gentiles into the church - but I think the context of Peter's words is obvious and does not need to be enlarged upon.