Yes, the potato clock will work when still in the ground, but it won't work any better than a potato removed from the ground.
Potato batteries are awesome and cool projects, but they often convey the wrong concept. The energy produced from a potato battery is not from the substance, nutrients, or sugars of the potato, but rather via the galvanic action of the two metals inserted into the potato.
The simple counter to this mental model is to point out that you can make a battery out of salt water, which clearly doesn't have any organic, energetic molecules in it. However, I'll talk a bit more about what's actually causing this effect and why it doesn't work in the way you imagine it might.
The above image is an example of a "potato battery" made without the potato. Identical setup and the energy obtained is identical given everything else the same.
Potato power- er, metal power?
This experiment is supposed to demonstrate the concept of an electrochemical cell. Electrochemical cells obtain their energy from the reduction-oxidation reactions that happen between two metals with different reduction potentials. When two metals - such as copper and zinc - are placed in a medium that permits the exchange of electrons and ions, an electrical gradient is produced as electrons move from one metal to the other and ions move the other direction. This gradient can then be captured and used to do work such as powering a lightbulb or an AI.
In the potato powered example, the power comes from zinc and copper. If you want a more powerful battery, use more zinc and more copper- not a bigger potato. If that is not good enough, try replacing the zinc with something like lithium- this is what we've done with modern, rechargeable batteries.
In truth, the potato battery would be better described as a normal battery that just happens to be inserted into a potato. You'll make a better battery if you use copper pennies and aluminum foil in vinegar.
I do not mean to shoot down your idea, and I am glad you are looking into renewable energy sources- but you may be better served by a class on electricity and batteries than by asking questions on biology.SE!
EDIT: I would assume that the electrical potential of this kind would also kill the plant, given that you're essentially electrocuting it. However, I was unable to find any information on the resistance of potato plants to electrocution.