The easiest fix is to use the indirect function. This lets you enter a string for the range, and those values will not adjust when dragging.
Here is the formula:
=XLOOKUP(INDIRECT("Table1[@Value]"),INDIRECT("Table2[Value]"),Table2[Val2],,0)