Glad you found a way around the selection set limitation.
Perhaps it might help if I cleared the selection sets at the conclusion of the code with:
(foreach itm lst (set (read itm) nil)) ; clear selection sets

But as an alternative I came up with this code wbb.lsp which implements lists instead.
If you get a chance, let me know how this works out for you.
; wbb selects all blocks with name "TYPE 4 SIDES" having attribute tag "PANEL-REF"
; and finds all matching attribute values "W69" "W70" & "W71" creating corresponding lists made up of entity names
; then wblocks from each corresponding list all the entity names included onto users desktop with corresponing dwg name "W69" "W70" & "W71"
; OP:
; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/wblock-instances-of-block-to-separate-files-named-as-attribute/m-p/12086133#M451125
(defun c:wbb (/ attribute_string attribute_tag blkname cmdecho ent idx lst menuecho obj sel wb)
;;;---load vl functions
(if(not(car (atoms-family 1 '("vl-load-com"))))(vl-load-com))
;;;---wblock with given nam as list & dwg name to desktop
(defun wb (nam / dwg i len lst)
(setq
dwg (strcat (getenv "UserProfile") "\\Desktop\\" nam ".dwg")
lst (eval (read nam))
i 0
)
(if(not(zerop(setq len (length lst)))) ; if there are obects in the list
(progn
(if(findfile dwg)(vl-file-delete dwg)) ; delete existing found dwg
(vl-cmdf "_.Wblock" dwg "" (getvar"insbase")) ; use current base as wblock dwg base
(repeat len (vl-cmdf (nth i lst))(setq i (1+ i))) ; cycle through items in list
(vl-cmdf "" "_.Oops") ; complete wblock & bring back objects
(if(findfile dwg)
(princ(strcat"\nSuccessfully Wblocked " (itoa len) " Objects to: " dwg))
(princ(strcat"\nFailed Wblock for: " dwg))
)
)
(princ(strcat"\nNo Attributes Found Matching Value: " nam))
)
) ; defun
;; setup environment
(setq blkname "TYPE 4 SIDES" cmdecho (getvar"cmdecho") lst '("W69" "W70" "W71") menuecho (getvar"menuecho"))
(setvar "cmdecho" 0)
(setvar "menuecho" 0)
(foreach itm lst (set (read itm) '())) ; initialize each list
;; search for matching blocks
(if (setq sel (ssget "_X" (list '(0 . "INSERT") (cons 2 (strcat "`*U*," blkname)) '(66 . 1))))
(progn
(repeat (setq idx (sslength sel)) ; repeat through selection set
(setq obj (vlax-ename->vla-object (setq ent (ssname sel (setq idx (1- idx))))))
(if (wcmatch (strcase (vla-get-effectiveName obj)) blkname) ; if block name matches
(foreach attribute (vlax-invoke obj 'getAttributes) ; cycle through all attributes within block
(setq attribute_tag (strcase (vla-get-tagString attribute)))
(setq attribute_string (strcase (vla-get-textString attribute)))
(if (= attribute_tag "PANEL-REF") ;; if attribute tag matches
(foreach itm lst ;; add matching entity to each list
(if(= attribute_string itm)
(set (read itm) (append (eval(read itm)) (list ent)))
)
) ; foreach
) ; if
) ; foreach
) ; if
) ; repeat
;; run wb subfunction on each list
(foreach itm lst (wb itm))
(foreach itm lst (set (read itm) '())) ; clear each list
) ; progn
) ; if
;; restore environment
(setvar "menuecho" menuecho)
(setvar "cmdecho" cmdecho)
(princ) ; clean exit
) ; defun