But has it really lost? I still see it used a lot in large corporate and high tech environments.
I was never a big fan of SOAP myself, but that's also partly because when I started, the tooling wasn't great and I got mostly a negative user-experience. But this is many years ago.
My understand is that these days it's quite good, and it has a pretty good user-experience. Furthermore, everything is backed by xml schemas, which makes it easier to create and require strictly valid xml being sent back and forward.
While some equivalents exist in REST-ish API's, it's arguably not very common and with SOAP it's a pretty much a free and built-in feature that everybody uses.
Modern web API design is great for getting things up and running fast, but it's not amazing for rigorously robust design.
I don't really like the "SOAP is bloated and over-engineered" narrative. It is uninteresting now, and was uninteresting 10 years ago.
I think it's much more interesting to learn about the things that SOAP did get right, and see how we can apply some of these learnings in our API's.