I suppose it's not worth worrying about, but note that in principle this would do the wrong thing if command buffer IDs were to wrap.
I don't think I see how, and anyway, don't we explicitly avoid wrapping in wined3d_context_vk_submit_command_buffer()?
If e.g. "completed_command_buffer_id" was ~(uint64_t)0, and "current_command_buffer.id" was 1, the subtraction would evaluate to something larger than 4, despite there only being a single pending command buffer. But you're right, we handle this in wined3d_context_vk_submit_command_buffer(), and there's other code that relies on that as well, so it's not an issue.