Environment : Office 365 Enterprise E3 / SharePoint Online (Plan 2)
To re-create issue : Create a simple list with single line text (named EmployeeName) and people picker column (named EmployeeCode). Now add a list item with completely new EmployeeCode i.e. add user which you have never used/added previously.
And now get the list items using below REST api : /_api/Web/Lists/GetByTitle('MyTestList')/Items?$select=*,EmployeeCode/FirstName,EmployeeCode/LastName&$expand=EmployeeCode
Issue : In response i am getting null values for FirstName and LastName. And it gets resolved after few minutes. Then again if i add new random user, his/her FirstName, LastName will be fetched after few minutes (Same scenario is not seen when i query previous added users). I not sure if this has to do with number of SharePoint users.
Number of SharePoint AD users : 300K+