How does the Unreal compiler handle references to container structs in memory?

I know this is a broad one, but let me explain.

I’ve been trying to clean up my code and make it easier to write. I thought I’d use some references to some bigger structs I’ve been using.

In my code I have a reference variable to a parent struct, and a reference to a child of that struct. The parent and children are both in TMaps.

I was seeing errors in my code which I realised have resulted, seemingly, from the fact that when I make some changes to the child, they are not reflected properly in the parent.

I am not sure whether the data is being moved or the referencing is actually making a copy or preventing other references from editing the data being referenced. The odd thing is that some data does stick.

Does anyone have experience using references with Unreal cpp and/or is this a known bad practice with reference variables? My reading has turned up nothing so far.

Edit: To satisfy my own curiosity on the memory question, I recreated the child reference after I edited the containing map and a sibling map. The behaviour is the same. I then edited the same value using a path from the parent and it stuck.