Other thing to note is passing a std::unique_ptr<> by value into a function. A std::unique_ptr<> can't be copied, it can only be moved. So passing one by value actually moves the smart pointer.
That transfers the ownership of the contained pointer to the temporary function. When the function returns it either has to return ownership back to the caller or
the unique_ptr in the caller now holds a null value.
The unique_ptr in the function is a temporary that is destroyed when the function terminates.
Using and passing a std::shared_ptr<> would simply add a reference count and "create a temporary copy for the function", and when the function returns that temp copy is destroyed and the reference count is reduced by one.
What actually happens when passing a shared_ptr is up to the implementation, creating a temp copy doesn't necessarily have to happen. The actual shared smart pointer could be passed via reference/pointer and we only semantically think a copy is made since that is what happens when passing by value a non-smart pointer object.
Passing a smart pointer in and out of functions can be different vs. using a raw pointer.
Unless you actually need to manipulate the smart pointer itself directly in the function pass the smart pointer's underlying object instead.
As "clunky" as the std::make_unique<>() syntax appears to be, it explicitly declares what is happening without the need for using new. Using new happens "behind the scenes" within the function.