You are correct that at the basic level only transitive verbs (and some intransitive exceptions) should be used with the particle を to mark their objects. However, this changes the moment things verbs are conjugated into other forms. てある is a stative verb. Once ~てある is added to the end of a verb, it loses transitivity.
So although you would use を in this sentence:
誰が窓を開けた。
Someone opened the window.
You would not use を in the following sentences:
誰かに窓が開けてある。
The window was opened by someone (for a certain purpose).
窓が誰かに開けられた。
The window was opened by someone。
So, in cases like ~てある and the passive form (開けられる), transitive verbs no longer use the particle を. Once verbs are conjugated into other forms, the way they are used often changes. As a result, 「窓を開けてある」would not be correct in most contexts.
There are exceptions where ~てある is used with the particle を to emphasize the volition of the agent, but it is not regarded as grammatically correct by most. Oftentimes, を is also replaced by は in those circumstances.