You can use cursor-sensor mode for this if you have emacs 26ish. The idea is you set cursor-sensor functions on a region that do something depending on whether you enter or leave the region. Below, I tie into the org font lock mechanisms to add these properties so that when you enter, typo mode gets turned off, and when you leave it gets turned back on. I use a similar approach to put src-block specific key maps on src blocks. There are two examples of functions that are "lightly tested". I can see why you would want this disabled in src blocks, it never puts the right quote in!
(defvar scimax-src-block-cursor-sensor-functions '()
"List of functions to run in cursor-sensor mode. .")
(defun scimax-add-cursor-sensor-functions-to-src-blocks (limit)
"Function used in font-lock to add cursor-sensor functions."
(let ((case-fold-search t))
(while (re-search-forward org-babel-src-block-regexp limit t)
(let* ((beg (match-beginning 0))
(end (match-end 0))
(cursor-functions (or
(get-text-property beg 'cursor-sensor-functions)
`())))
(cl-loop for func in scimax-src-block-cursor-sensor-functions do
(when (not (memq func cursor-functions))
(pushnew func cursor-functions)))
(add-text-properties
beg end `(cursor-sensor-functions ,cursor-functions))))))
(define-minor-mode scimax-cursor-sensor-mode
"Minor mode to turn on cursor-sensor-mode for org src-blocks."
:init-value nil
(if scimax-cursor-sensor-mode
(progn
(add-hook 'org-font-lock-hook
#'scimax-add-cursor-sensor-functions-to-src-blocks t)
(add-to-list 'font-lock-extra-managed-props 'cursor-sensor-functions)
(cursor-sensor-mode +1))
(remove-hook 'org-font-lock-hook
#'scimax-add-cursor-sensor-functions-to-src-blocks)
(cursor-sensor-mode -1))
(font-lock-fontify-buffer))
(defun scimax-cs-message-1 (win prev-pos sym)
(message "%s %s %s"
win
prev-pos
sym))
(defun scimax-src-toggle-typo-mode (win prev-pos sym)
(if (eq sym 'entered)
(typo-mode -1)
(typo-mode +1)))
(add-to-list 'scimax-src-block-cursor-sensor-functions
'scimax-cs-message-1)
(add-to-list 'scimax-src-block-cursor-sensor-functions
'scimax-src-toggle-typo-mode)
John
-----------------------------------
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803