How to turn a function into a string without activation/use of any modules in javascript

Apparently this might look at a duplicate.. but let me explain the problem.
For the sake of the question ALL I can assume is that my code will be run, I do not know anything about the modules(if they’re fake or something) and can only trust the things that get set in instances that only my code will control(or originally set that they cannot be configured)

What I want to do is to as my heading says, to convert a function to a string.. however all my attempts at conversion depend on a module that can be overwritten by the client

Function.prototype.toString=()=>"pwned" //work of the client
//failed attempts to convert to string below
console.log(`${Object.keys}`) //"pwned"
console.log(Object.keys+'') //"pwned"
console.log(Object.keys.toLocaleString()) //"pwned"

Starting out with the only assumption I’m making(that my code is being run), I tried this below however it returns undefined(I thought returning nothing would somehow make it the default string)

//infinityLoop is a function I write(all this is inside another self calling function) and the name suggests what it does
//the concept in this example is to run the code and if it smells anything suspicious, infinite loop
try{((href)=>{
var symbol=Symbol.toPrimitive, c=1
var testObj={[symbol]:function(){return c++}}
if(testObj-0!==1 || c!==2){throw "bruh"}
function str(item){
  var measure=null, unit={}, count=0
  function verifier(hint){
    const condition=hint!=="default" || this!==item || verifier.caller!==str || count!==0
    if(condition){infinityLoop()}  else{ measure=unit; count++ }
  }
  item[symbol]=verifier; const string=item+''
  if(measure!==unit || count !==1){throw "bruh"}
  delete item[symbol]; return string
}
str(Object.keys) //"undefined"
//I get to control the conversion but I still can't convert it ;-;
})()}catch{infinityLoop()}

Is it possible to convert a function to string without overwritable modules or is this a ridiculous impossible question?