Is there any equivalent function of 4.x VisibilityLayer in 3.x?

Godot Version

3.x/4.x

Question

In 4.x, if one node have two sprites with different VisibilityLayer, then render the node in two different viewport with different CanvasCullMask will show different things. Is it possible for this kind of thing in 3.x?

A more detailed example:

Main (script Main.cs)
|--SubViewportContainer1
|    |--SubViewport1 (CanvasCullMask = 1)
|        |--Camera2D1
|        |--Node2D (VisibilityLayer = 1&2)
|            |--Sprite1 (VisibilityLayer = 1)
|            |--Sprite2 (VisibilityLayer = 2)
|--SubViewportContainer2
|    |--SubViewport2 (CanvasCullMask = 2)
|        |--Camera2D2

In Main.cs:

public override void _Ready()
{
	SubViewport vp1 = GetNode<SubViewport>("SubViewportContainer1/SubViewport1");
	SubViewport vp2 = GetNode<SubViewport>("SubViewportContainer2/SubViewport2");
	vp2.World2D = vp1.World2D;
}

In Viewport1 only Sprite1 is visible, and in Viewport2 only Sprite2 is visible.