Thanks for writing here.
Sebaceous cysts do not respond to any medical treatment.
They need surgical excision.
Cysts on shaft of penis are harmlees and if they are small in size ,it does not require any treatment.
The creams prescribed may be for some other reasons like fungal infection
and if you are not having any symptoms you can stop them now.