Changing Tilemaps seamlessly during parallax2D scrolling

Godot Version

4.3

Question

I’m working on a sonic wings like game and I have a Tilemap being scrolled using a Parallax2D. I would like to make different areas for the game. For example, I’ll be using the same tilemap (let’s say a green grass tilemap) for the entire duration of the stage, but after defeating all the regular enemies, I want to change the tilemap to a water tilemap for the boss fight, without reloading the stage or warping the player to a different tilemap, just make the tilemap loads a new tileset from a point in the stage.

How can I change the tilemaps this way?

This can be very difficult to achieve with infinite scrolling, but there are ways to set it up sometimes. How would you plan to transition between the two tilemaps?

The idea is to make it appears as a natural progression of the background. Let’s say you are in the green grass zone. The tilemap is scrolling in the background, all green, and then, when it’s time to change the tilemap, a water tileset starts to appears, as if it was already part of the green grass zone. Like if everything was in the same map, you know?

So it sounds like you’d either need three tilesets or one that covers both. 1 for the first area, 1 for the transition between the two, and 1 for the second area.

I see, but how this transition works? How do I implement it?