NFS 4 servers are allowed to clear a client's locks (and all state information) if that client has not renewed them within the "NFS4 lease time". Once they are cleared, they cannot be "reclaimed," although NEW locks could be requested by the application once it learns of the error (which usually comes to it as EIO -- IO error). How well the client application reacts to such an event is up to the application code and it's skill at error recovery.
The lower that the NFS4 lease time is set, the more likely you are to have temporary communication gaps that are long enough to let an NFS Server clear the client's state information and locks. Linux NFS Servers usually default to 90 seconds, which is pretty good protection. However, people who don't fully understand the impact of lease time often drastically reduce this value. Plus, some non-linux NFS Servers default to much lower values. For example, NetApp NFS servers default to 30 seconds, which doesn't offer as much protection against short network outages.
So one cause / solution is: NFS Server's lease time is too low and needs to be raised.
Another cause: If the network between the client and server were highly reliable, there would be fewer chances of this kind of thing happening. So checking all network hardware / firmware for anything that degrades reliability can be important.
If a Cluster is in use, sometimes these errors correspond to events where a NFS Server cluster had to fail NFS export resources over to another node. NFS4 Server clusters that are very carefully designed can preserve lock status from one node to another, but most people's NFS4 clusters are not designed that well. So it is fairly common that EVERY cluster resource migration of NFS4 exports can cause locks (and other states) to be lost, causing clients to log these kinds of errors. Hence cluster design may need to be examined, to make sure that the necessary design and configuration to preserve locks and states (during failovers and migrations) is accomplished.
And yes, NFS v3 doesn't allow NFS Servers to clear locks just because the client didn't renew them (that concept doesn't even exist in v3), so this exact type of situation doesn't come up there.