Error with NeuralPDE and OptimizationFunction

I tried to solve the ODE problem with NeuralPDE on Jupyter notebook, and the code ran when I used the older version of Julia and packages (version 1.9.0 and I forgot the version of packages).
I updated all packages yesterday, and when I ran the code again an error occurs following:

MethodError: no method matching cos(::Matrix{Float64})
You may have intended to import Base.cos

Which is not occur before I update packages.

I tried to use the older version and packages in Julia which has information as follows:
Julia version 1.8.5.
ModelingToolkit v8.50.0
Lux v0.4.37
NeuralPDE v5.6.1
Optimization v3.15.2
OptimizationOptimJL v0.1.9
and got another error:

MethodError: no method matching (OptimizationFunction{true})(::typeof(loss_function), ::AutoZygote)

However, the code can run normally on another computer.

Please help me to fix it.
Thank you all.

This looks like it was just a versioning issue. Make sure you’re on latest versions matching the versions used in the docs. The Reproducibility section describes exactly the versions used to make the documentation: