Unless you are using a c++ compiled engine you have downloaded from the github or Unreals other source control changes made to the engine code won’t actually show up. The engine code you have in the versions on the launcher is more for reference than anything else.
It is feasible but there is generally no reason to do so.
You can create a new c++ class that inherits from Actor that has your new variable in it and you can do that without recompiling the engine (or risking messing up the code).