Shim to make PCB section thicker
To compensate for 0.4 mm thickness, you obviously need a 0.4 mm non-conductive shim, you said it yourself, minus thickness of glue.

However, USB specification explicitly define all connectors with conductive housing. It is done for a reason of protection of USB signals against ESD events. Every time people plug in your device, the built charge on the dongle and on the entire body will go into power (and possibly signal) pins. The metal housing on USB connectors is meant to divert the discharge currents into a separate shield. This consideration goes both ways, to host, and to your device, since D+/D- are well exposed to a touch.

To make things right, you better use dedicated PCB-mounted USB plugs, they are not very expensive these days. Like this one. 



This will make things right.

Alternatively, if you continue to make naked connectors, you can build your PCB in a place that can make specified thickness for you, 2 mm for example, for extra price. Look at PCBWay.com.