The issue was that 10f, plotted with contour, silently changed the clim (of f plotted with heatmap). I think you can fix that with the clim kwarg, e.g.,
using Plots
f(x,y) = (x + 2y^2) * abs(sin(y) + cos(x))
x, y = 1:0.5:20, 1:0.5:20
p1 = heatmap(x, y, f, size=(700,700), α=0.5)
contour!(p1, x, y, (x,y)->10f(x,y), c=:black, levels=100:100, clim=(0,1500)) # note the clim kwarg
