No you will lose all of your friend safaris/friend codes if you use the same game on a different 3DS because once you get your friend code and when you get other friend codes, all of that is saved into the 3DS so when you use another 3DS, the saved wi-fi/memory/friend codes will be unrecognizable on the other DS.