Your comparison can be a bit misleading, since this isn't exactly about RVO and more about what type is constructed/returned.
The texture is moved in the first example, because it's moved into the optional.
It's not a failure of RVO, but a construction of a new optional instance with an existing type, which then needs to be moved.
If you want to look at RVO, you'll have to check what happens to the optional, as that's the return type and the one that can be RVO-ed.
I'd assume in all cases optional is optimized.
But it seems like a valid question, whether
Texture::create should create a
std::optional<Texture> from the start, instead of implicitly converting it when returning.
Note that the current implementation is not finalized and there are
some open discussions regarding constructurs/loaders.