A keyed hash is not susceptible to collisions / the birthday paradox as the attacker doesn't have the key; you cannot do any pre-calculation and create a set of known hashes because of that (well, you could if you'd have an Oracle with the key, but in that case the Oracle would be signing random data delivered to it).
So you underestimate the security offered by HMAC; in most cases it offers security that is approximately the same as the output size / size of the key. See also keylength.com / NIST recommendations for instance (you need to look at "Hash (B)" for HMAC in the table).
However, you are using y = SHA384(w)
. Now if an attacker can try and create collision for specific values of w
, which would mean that the hash collision is used within the HMAC input, which will of course result in the same HMAC value as well. So here the birthday bound does apply.
So yes, in this case you could try and use SHA-384 or SHA-512 (as length extension attacks won't result in a collision, so those are not on topic). SHA-384 could be used if you suspect that another block of hashing is required if SHA-512 is used though; SHA-384 may then be slightly more efficient - if such efficiency is required at all.
However, please note that we generally assume that SHA-256 already has a strength of 128 bits even when assuming birthday attacks, so there is still no pressing need to use SHA-384 even then.