I’m facing an issue with creating a view layer from a multi-layer hosted feature service in ArcGIS Online using ArcGIS API for Python (v2.4). The hosted service contains points, lines, and polygons. When I create a view layer using Python by passing the required layer objects to create_view(), only the point layer appears on the AGOL Item page (as shown in image), even though the polygon layers (Zones, RestrictedArea) are visible in the service REST page (as shown in image). If I use a list of layer IDs in create_view(), all layers appear, but I only want the specific layers defined in my configuration.

Bringing the AGOL URL into ArcGIS Pro, exporting each layer into a new FGDB, and republishing works as expected. But when republishing the File Geodatabase which is exported directly from the feature service in AGOL or using the Item ID directly in the code, the problem persists (only the point layer shows on the Item page). I’ve also attached the Python code I used for creating the view layer.
I’m looking for a way to ensure that the view layer displays only the specified layers in AGOL without having to republish via ArcGIS Pro. Has anyone experienced this before, or can anyone help me with a solution?