I first noticed this bug on a server that had the latest update 1.15.2 but i also tried it on single player and its the same problem.
I create a nether portal at spawn in a new world then i fly over 800 blocks away in a diagonal (randomly) and create another nether portal and go into it, then go back through it and it takes me to my spawn portal over 800 blocks away, is this how portals work now in 1.15.2?
It all depends on where your second portal appears in the nether. If for some reason (middle of lava lake perhaps? it has to offset to be created, it might get closer to the first portal coordinates than to the second one. On entry, the portal searches starting at it;s equivalent coordinates in the overworld and links to the first (closest) one it finds.
Overworld portals as much as 2048 blocks apart can lead to the same portal in the Nether due to the 8:1 factor between the Overworld and Nether (that is to say, a portal at 0,0 in the Overworld will ideally link to a portal at 0,0 in the Nether, and another Overworld portal at 800,800 will link to 100,100, which is within the 128 block radius the game searches for a portal when you go to another dimension. Note that in this case (ideal portal locations for one pair) the maximum distance for other Overworld-side portals is 1024 blocks):
Likewise, this explains why you may find yourself coming out of a different portal when you return from the Nether even with only one Overworld-side portal, since the 8:1 ratio now means that a Nether-side portal can only detect an Overworld-side portal within 16 blocks; not only that, this is based on the exact coordinates where you entered the portal you so you can actually travel to two different portals depending on which side you went in (more so for larger portals; a max-size portal is 21 blocks wide and this translates to a 160 block difference in the Overworld so it can go out of range of the portal you entered from unless it is centered at the ideal coordinates, which gives a difference of +/- 80 blocks in the Overworld):
If you want a portal in the Nether that connects to your second Overworld portal write down the Overworld portals coordinates and divide the X and Z by 8, then go to those coordinates (the converted ones) and build a portal there.
That portal should connect to your second Overworld portal and vice versa.
(The X and Z coordinates have to be within 16 blocks, the Y doesn't matter as long as the portal is the closest one to the converted coordinates of the portal you want it to connect to.)