This is due to the difference between a pointer to a static/free-function and a non-static function.
To call a method of a class using a function pointer, you also need an instance of that class. (C ++ usually implements this as a hidden parameter. AFAIK MSVC pass this in the RCX register, but it is an implementation detail.)
A pointer to a free/static function will always fit std::uintptr_t and can be safely stored as void*.
The pointer to the non-static class method is a different story. Such a function can be virtual, so instead of holding an address, it holds address to v-table and index of that function in v-table. In addition, inheritance can also be virtual, which complicates things even more.
Note that you have to ensure that the class instance you are referring(this pointer) to in TFunction must exist at the time you call TFcuntion. Otherwise it will be a crash.