Reproduction steps:
1. Open the attached user's project "UIToolkit.zip"
2. Enter Play Mode
3. Enable the Stats window in Game View and check the amount of initially loaded vertices
4. Press the left mouse click to enable hidden objects and check the number of vertices in the Stats window
5. Repeat step 4 several times and observe the Stats window
Expected result: vertex count and buffer usage goes back to the initial state which were the same when entering Play Mode
Actual result: vertex count and buffer usage does not go back to the initial state (See attached Results.png)
Reproduces on: 2021.3.4f1, 2022.1.1f1, 2022.2.0a15
Could not test on 2019.4.39f1, 2020.3.34f1 due to various missing assembly definitions when downgrading
Notes:
-If you toggle the elements to VisualElement.style.visibility = StyleKeyword.Null (make them visible again), and then back to Hidden again, the vertex count and buffer usage remains inflated and will not go back to the original state levels.