Have you ever noticed that the child elements of an element form hide slowly when using visibility:hidden, but hide quickly when using display:none? This slow hiding can negatively impact user experience.
I tried to find information on this issue, but everything I found only discussed how it affects the DOM tree, not why the element form and its child elements are rendered in a particular way. To see this problem in action, visit this page: here. The first example on the page demonstrates the issue - you can press F12 to see for yourself. Here is an image and a GIF to help visualize the scenario: