As you mentioned in your post, if the door frame is moving, you might want to consider having that fixed. Depending on the cause of the movement, it might be relatively easy to fix. Otherwise, no matter what you do to 'patch the wound', eventually, it will 'bleed' again.
Just my thoughts. My best to ya and hope this helps.