When I load a world, how do I ensure it does not mess with player advancements?

This is for SpongeVanilla 7.4.0.

The code can be found here (see the “createLightonia” method): lightonia/WorldFunctions.java at main · Jelly-Pudding/lightonia · GitHub

The problem I am having is that when I create and then load a world, the advancements get loaded and they load in an unideal way:

2023-03-13 20:17:20 [Server thread/INFO] [Sponge]: Loading world [Lightonia] (minecraft:overworld/2)
2023-03-13 20:17:21 [INFO]: Loaded 488 advancements
2023-03-13 20:17:21 [INFO]: Loaded 6 advancement trees
2023-03-13 20:17:21 [WARN]: Unable to find spawn biome
2023-03-13 20:17:50 [Server thread/INFO] [Sponge]: Unloading world [Lightonia] (minecraft:overworld/2)
2023-03-13 20:17:55 [Server thread/INFO] [Sponge]: Loading world [Lightonia] (minecraft:overworld/2)
2023-03-13 20:17:55 [INFO]: Loaded 488 advancements
2023-03-13 20:17:55 [INFO]: Loaded 6 advancement trees

Here you can see 488 advancements and 6 advancement trees. But the thing is due to custom advancements I believe this is really meant to be shown:

2023-03-13 20:52:21 [INFO]: Loaded 574 advancements
2023-03-13 20:52:21 [INFO]: Loaded 15 advancement trees

And yea soon as I load the world I created, I get this:

2023-03-13 20:59:36 [INFO]: Loaded 488 advancements
2023-03-13 20:59:36 [INFO]: Loaded 6 advancement trees

If I then relog, I lose a ton of advancements (the custom ones that were made).

Is there any way to ensure these advancements are not lost when players log in after I load the world I created? Thanks in advance.

Fix for this was copying /data/advancements over to the new world (Lightonia in this case) folder pre-emptively before either creating it or loading it.