With Dynamic Surroundings' fog processing option enabled, Phantoms no longer lose visibility inside blocks.
Disabling this feature of DS restores the visibility decrease.
Screenshots for comparison's sake.
Fabric:
Forge:
Forge after disabling Dynamic Surroundings' Fog Processing option:
EdwinMindcraft commented
This is a limitation of Forge. There is currently no way to work around it.