Unable to populatecontentEntityObject.setLastModifier from REST API

Hello Guys,

I’m developing a REST API that sets the creator and the last modifer of a specified page id:

    ContentEntityObject contentEntityObject = contentEntityManager.getById(Long.parseLong("22544491")); // Id of the page;
        ConfluenceUser user = userAccessor.getUserByName("username");
        contentEntityObject.setCreator(user);
        contentEntityObject.setLastModifier(user);
        SaveContext saveContext = DefaultSaveContext.builder()
                .updateLastModifier(true)
                .build();

setCreator() worked and I was able to set the creator corrctly, however, setLastModifier() didn’t work.
Can you please help?

Thanks,
Rosy