Please follow below steps:
Create new column where you can store Id of created by.
Now apply workflow on that list.
In that workflow set the value new column field to Id of created by.
Let me know if there are any issue.
Out of the box this is not possible, but here is a workaround.
- Create a new People Picker or Text column into the list.
- Create a SharePoint Designer workflow and trigger it when new item is added.
- In Workflow, update the same item and set the ID of the created by field to the newly created column.
This will work as expected.
Let me know if you need any more detailed information.