Diagnostic step 1
Before reintroducing VLAN 40, verify trunk port configuration on both switch and core router: ensure native VLAN is identical and explicit tagging is enabled for all user VLANs (avoid relying on untagged/native frames for critical VLANs).