I currently have the same problem. But I also had this problem with v3.8.x.
I had deactivated all plugins at that time. That didn’t work. For other reasons I had to install the 3.8.x theme 3x. After the 3rd time the head builder suddenly worked again.
Now after the update to 4.0.2. it doesn’t work again anymore.