Whenever you use a const variable, imagine the compiler copy/pastes its value directly into your code (you can read the more technical definition in the Rust Reference).
That means your code is roughly equivalent to this:
When phrased like this, it's obvious that temp_1 and temp_2 are completely different variables that live in different locations in memory. Hence the different addresses.
If you were to compile in release mode, you'll probably see the optimiser move the BCRYPT_SHA256_ALGORITHM_WSTR into some readonly data section in your program that f() and g() both refer to instead of having multiple copies floating around. This behaviour isn't guaranteed, but optimising compilers will do it pretty often because it helps reduce your overall binary size (you can think of string literals as const variables, and imagine if your binary had 50 redundant copies of " ").
If you want a guarantee that BCRYPT_SHA256_ALGORITHM_WSTR will have the same address every time, change it to a static variable.
The rule of thumb is that you use a const when you want this sort of copy/paste semantics with immutable variables, and only make something static when you want the semantics of a stereotypical global variable (only one instance, using & gives you the same address every time, etc.).