Since you completely replaced the original object of the prototypeobject fwith a simple object. It was an original object prototypethat contained a link to fthrough a property .constructor.
The constructor of an object created using the object literal syntax will be the constructor Object.
To return it, you need to put it there manually.
f = function() {};
f.prototype = {};
f.prototype.constructor = f;
thing = new f;
.constructor .
, Object.
delete f.prototype.constructor;
console.log(thing.constructor);