Logic pro x and midi guitar 2

I use latest logic prox and when I play I can hear the midi sound. However when I hit record then I can hear the guitar input but no longer the chosen vst attached to the midi sound.

Why is it that the midi chosen sound can be heard but then not when trying to record the midi sound?