 If you pre-print your article and then it goes to the journal, it will be picked up as being almost 100% similar to the pre-print. So the way to get round that, you can't get round it in terms of it being detected, is that you first of all should check that the journals accept pre-printed articles. Not absolutely all journals do, most are moving that way now under open science. But if they do, and this is picked up, then the way to do it of course is to cover yourself by giving a link to the pre-print. You can do that on the title page, make it clear to the editors and possibly even to the reviewers that it has been pre-printed.