This should provide you with the autosave file name setting in org mode only.
(add-hook 'org-mode-hook 'my-org-mode-autosave-settings)
(defun my-org-mode-autosave-settings ()
;; (auto-save-mode 1) ; this is unnecessary as it is on by default
(set (make-local-variable 'auto-save-visited-file-name) t)
(setq auto-save-interval 20))
Note. Your addition 'auto-save-modeto 'org-mode-hookdisable auto save as it is enabled by default (unless you have disabled it globally).
source
share