This will all depend on the size and type of object stored in a vector.
If you have a relatively small and flat struct that you are storing, then sure that will likely win. But if you are working with a collection of pointers, then the hash map will (almost) always win.
> Hard realtime code where predictable latency matters. Hashmap has a bad worst case
The hash map worst case is a linear search. It will be a lookup + the search. This also depends on the implementation. You could, for example, use a robinhood hash map which trades insertion times for lookup times.
A bad hashmap implementation will store collisions in linked lists. A better one will try and put them in a b-tree. An even better one will use a vector for collisions. And the most cache friendly version stores everything in the table and does probing on collisions.
There are specific cases where vectors are better, but those are the exception and not the rule in my experience.