Unlocking Android phone immediately after reboot
Note: This is a workaround.  

Some users have posted about the bug (saying this bug is present from long time)
 in reddit and oneplus forums.
Since it is a bug, there is no definitive solution to this.  

One possible work around is to simply turn off the screen by pressing &nbsp;lock button
and turn back on by pressing &nbsp;lock button&nbsp; again, and enter your pattern.