Unfortunately, functions are not “global” so they are limited to a single screen. Thunkable needs to be a little more flexible and that’s one way it could be improved. That feature request has been made in the past but it wouldn’t hurt to make it again at Feature Requests - Community
There are some suggestions for workarounds here: Creating a function usable across screens