[python] set layer visibility issue

Here’s an explanation: