One possible outcome is that rather than ending, science becomes detached from the natural world and becomes about the world we continually make. That is to say, there are scientific fields that only make sense to exist because not just of what the universe fundamentally is, but the specific events which happened within it - the study of biology for example makes sense at least partially in the context of the specific emergence of and history of life on Earth, even if we may wonder if there are universal laws of biology. The study of medicine even more specifically depends on the particular path of evolution that led to our body plans, our organs, our biochemistry, etc. If we had thought we had finished medicine and then found (or created) life from scratch on another world, the field of medicine would suddenly double.

Even if we 'finish' fundamental physics, we can still study the physics of computational universes of our own invention, probably forever.

That sort of infinite regress into self reference may not yield scientific 'advancements' that actually change our lives anymore however. We often reach walls limiting our fundamental ability to be more efficient, to wield more control, etc given a fixed amount of resources - and those walls often are not just a matter of insufficient cleverness, but we actually become able to prove that those walls cannot be passed. The science of engines can't let us exceed the Carnot efficiency - if you want to continue to make progress, you have to look in other directions like new kinds of fuel, new natural heat sinks, etc. We could certainly hit fundamental walls like that before we achieve the things we wish were possible in the physical world, such that we instead have to change what we want or need or are rather than just study it more.