Use Set variable mode from external library

Hello network, I am having problems using light and dark mode in my file

Context: I am creating a design system for my platform, as the design system will grow exponentially I am working on it externally, then I have a file where all my design goes, then from that file I am calling the design system library , in the library I have two color modes, then I call these colors from my design file, if I manually change the mode this works very well, but if I do it in the prototype I do not get results, even though the library is importing correctly, help with this please