You can go from XY to CCT (in Kelvin) with an approximation, but you cannot go the other way. You have to read the above article to understand why. These things aren’t equivalent. Mathematically, by trying to go from Kelvin to CCT doesn’t have a single solution: you’re going from one variable (Kelvin) to two (X and Y).
The equivalent is to ask: In a 3D room, I’m standing 1m from one of the walls. Where exactly in the room am I? You cannot answer this with a point. You could be standing (or floating) anywhere on a plane 1m from the wall.