This addon mod prevents the Twilight Forest's caves from cutting off due to being below rivers by removing the check for water
Before - After

This is only for 1.20.1, 1.20.4 onwards already has this bug patched
Only needs to be installed on server side
Programming by Project8gbDeRam
How to Install Twilight Forest Cave Fix (Mod)
Twilight Forest Cave Fix by Danmatisk is verified for Forge across Minecraft versions 1.20.1 (latest release: 1.0.0, file size: 8 KB). Follow the steps below to install it safely from ModCraft.tv:
- Click the Download button above and select your Minecraft version (1.20.1) and platform (Forge).
- Make sure you have the compatible loader or environment installed for Forge.
- Move the downloaded Twilight Forest Cave Fix file into your Minecraft
.minecraft/modsfolder and launch the game.