The short answer is that it isn't usually "fixed" by inserting something in that gap. Ideally there would have been an underlayment installed to bring the new flooring up to the level of the old, but I can see why that effort and expense would be foregone.
Just about anything you'd put in there will make the situation more conspicuous and possibly create more nooks for dust and dirt to accumulate. From an aesthetic standpoint I think I'd gently scrape away the caulk or whatever's on the door trim and call it done.
I'm not sure why you feel like you need to seal between interior rooms in your home--every door in mine has about a 1" gap under it anyway. If you do, here are some ideas...
- Rope caulk: foam bead or plastic tubing that you'd insert under the trim, following its shape.
- Custom-cut plastic or vinyl plates that match the shape of the trim profile. I'm really not sure how you'd make or procure these, but maybe someone with a 3D printer could help. You'd secure them with something like silicone caulk as an adhesive.
- Simple rectangular plates of plastic or vinyl, sized to the outer dimensions of the trim.