While const references extend the lifetimes of nameless temporary objects, they cannot "pass it on" (the object is no longer nameless).
So yes, this program has a bug: r is a dangling reference by the time getArea() is called.
If you must handle rvalues, you could provide an rvalue overload, but it wouldn't be able to return a reference:
I'm not sure if it applies to this case, but const reference like on line 8 can extend the lifetime of a temporary. If the temporary is actually destructed though then it is undefined behavior to use it - why not print the destructor calls?
This case is specifically mentioned as one of the exceptions to
The temporary to which the reference is bound <elided> persists for the lifetime of the reference except: ....
(one of the exceptions:) A temporary bound to a reference parameter in a function call persists until the completion of the full-expression containing the call.