When a new world is created, the first time the player opens the creative inventory, a large lag spike will occur, note the large spike at the right of the frametime graph.
[media]Attachments
Comments 5
These bugs are different but likely related; this report is for the one-time spike that occurs on opening the inventory for the first time, the other one is for the consistent minor increase in lag that persists while the inventory is open.
Does MC-261699 describing your issue ?