These "dots appearing only while (not) focused" are known as "extinction illusions", namely
"25 - Appearing Dots"
is "McAnany's type" [1], and
"26 - Disappearing Dots"
is known as "Ninio's type" [2], according Akiyoshi Kitaoka's materials. (I have recreated them too few years ago [3][4], before getting to the source.)