I have finally fixed the issue!
In my ODE function, I had a collect function:
Δr₊ = Cell_R⁺ₛ/(N₊ - 1)
Δr₋ = Cell_R⁻ₛ/(N₋ -1)
Rs⁺ₛ = collect(0.0:Δr₊:Cell_R⁺ₛ)
Rs⁻ₛ = collect(0.0:Δr₋:Cell_R⁻ₛ)
I replaced the collect function with a for loop:
Δr₊ = Cell_R⁺ₛ/(N₊ - 1)
Δr₋ = Cell_R⁻ₛ/(N₋ -1)
Rs⁺ₛ = zeros(Float64,50,1)
Rs⁻ₛ = zeros(Float64,50,1)
for i in 1:50
Rs⁺ₛ[i] = Cell_R⁺ₛ * (i-1)
Rs⁻ₛ[i] = Cell_R⁻ₛ * (i-1)
end
And now it works!