Both assertions succeed because they are applied to the type T
deduced from function argument. In both cases it will be deduced as a pointer to function because functions decay to a pointer to function. However if you rewrite assertions to accept types directly then first one will fail:
static_assert(is_same<void(*)(), decltype(fun)>::value);
static_assert(is_same<void(*)(), decltype(&fun)>::value);
online compiler