Entity Loader does not take into consideration a subsequent lock request

When I run two Threads A,B, the later thread(B) wait and come to the if statement after the end of first

Yes, that exactly how database locking works. For more details, check out this article.

However the Policy in thread(B) status is still PolicyStatus.CREATED.

Yes, that’s how MVCC works. Until you commit a Transaction, all other transactions don’t observe any state change unless you are using 2PL, in which case reads will block. For more details, check out this article.

Does entityManager.lock refresh the entity?

No. I does not. Lock, as its name implies, is about locking a database record, either optimistically or pessimistically. Refresh is a totally different concept.

This Hibernate tutorial contains many articles about Concurrency Control. You should read them to better understand the concepts.

This presentation is also worth watching if you prefer videos instead.