prevent object destruction compile error (#16134)
### Description
The proposed fix is to store the result of AsBlockSparse() in a variable
to ensure the object isn't destroyed until the end of the current scope.
### Motivation and Context
"own_buffer_tensor" is a temporary object that is destroyed at the end
of the expression and causes a compile error.