That's usually due to:
1. Converting directX into Vulkan (potentially very large performance gains)
2. Less OS overhead (usually minor gains)
That's not at all how that works. DirectX12 isn't slow by any stretch of the imagination. In my personal and professional experience Vulkan is about on par depending on the driver. The main differences are in CPU cost, the GPU ultimately runs basically the same code.
There's no magic Vulkan can pull out of thin air to be faster than DX12, they're both doing basically the same thing and they're not far off the "speed of light" for driving the GPU hardware.
The performance benefits of Vulkan and DX12 come from tighter control over the hardware by the engine. An engine written for older APIs needs to be adapted to gain anything.