Does Query Plan cache gets cleared by itself?
It's very unlikely, but you could be experiencing the bug described in the first comment to this user voice item: Procedure Cache empties spontaneously even on an idle machine


  This seems to happen when USERSTORE_TOKENPERM hits a certain value.
  ...
  Under this configuration, the plan cache empties spontaneously when the USERSTORE_TOKENPERM size grows to around 5 GB


You can check for that with this query:

select pages_kb 
from sys.dm_os_memory_clerks 
where [type] = 'USERSTORE_TOKENPERM' and [name] = 'TokenAndPermUserStore';


There are several other factors that can cause your plan cache to be emptied.  A non-exhaustive list of these factors includes:


someone ran the DBCC FREEPROCCACHE command to manually clear it
The server is under memory pressure, and old or single-use plans are being evicted from the cache