I don't know what's the difference between ようとしている and ようとする. But I know ようとした. ようとしている and ようとする mean " be about to do something" but I can't differentiate the ようとする and ようとしている. Sometimes they use する and sometimes they use している. I know they both mean "be about to do smth" but I think it differs in feeling.
The grammatical nuance of ～ようとする is like "move towards —ing", that means you can still make a progressive aspect out of it.
Talking about real examples, when you say 図書館で勉強しようとする, you are actually "doing" something like leaving your seat and walking to the library. 崩れ去ろうとする, too, before it's really going to break down, there are precursors like developing cracks or slowly tilting. Since they are "actions" too, we can think about their beginning and end as well.
Now at this point, it's just a general verb aspect question. The dictionary form する describes the action is (about to or just) beginning, or the action as a whole from beginning to end. している tells that it is in the middle of the action at this moment.
本を買おうとする時に電話が来る (probably when you just decide to buy a book)
本を買おうとしている時に電話が来る (probably when you are in a bookstore or searching Amazon)