Oil is considered a non-renewable resource. Plants however are renewable, so they are fundamentally different.
You can consider the solar->plant->animal cycle to effectively be similar to using solar panels. Using solar panels directly would be inefficient without batteries anyways, so the solar->plant->animal cycle is directly analogous to how we would use solar panels.